Installing rpy on redhat

I'm new to RedHat but have been using Ubuntu for a while. I am trying to install rpy2 using pip install rpy2

and I am getting the error

/usr/include/features.h:164:1: warning: this is the location of the previous definition

./rpy/rinterface/_rinterface.c:86:31: error: readline/readline.h: No such file or directory

In file included from ./rpy/rinterface/_rinterface.c:122:

./rpy/rinterface/embeddedr.c: In function ‘SexpObject_CObject_destroy’:

./rpy/rinterface/embeddedr.c:68: warning: implicit declaration of function ‘PyCapsule_GetPointer’

./rpy/rinterface/embeddedr.c:69: warning: cast to pointer from integer of different size

./rpy/rinterface/embeddedr.c: In function ‘Rpy_PreserveObject’:

./rpy/rinterface/embeddedr.c:107: warning: implicit declaration of function ‘PyCapsule_New’

./rpy/rinterface/embeddedr.c:109: warning: assignment makes pointer from integer without a cast

./rpy/rinterface/embeddedr.c:122: warning: cast to pointer from integer of different size

./rpy/rinterface/embeddedr.c: In function ‘Rpy_ReleaseObject’:

./rpy/rinterface/embeddedr.c:178: warning: cast to pointer from integer of different size

./rpy/rinterface/embeddedr.c: In function ‘Rpy_ProtectedIDs’:

./rpy/rinterface/embeddedr.c:301: warning: cast to pointer from integer of different size

In file included from ./rpy/rinterface/_rinterface.c:125:

./rpy/rinterface/sexp.c: In function ‘Sexp_sexp_set’:

./rpy/rinterface/sexp.c:282: warning: implicit declaration of function ‘PyCapsule_CheckExact’

./rpy/rinterface/sexp.c:288: warning: cast to pointer from integer of different size

./rpy/rinterface/sexp.c: In function ‘Sexp_init’:

./rpy/rinterface/sexp.c:738: warning: unused variable ‘copy’

./rpy/rinterface/_rinterface.c: In function ‘EmbeddedR_init’:

./rpy/rinterface/_rinterface.c:1333: error: ‘rl_completer_word_break_characters’ undeclared (first use in this function)

./rpy/rinterface/_rinterface.c:1333: error: (Each undeclared identifier is reported only once

./rpy/rinterface/_rinterface.c:1333: error: for each function it appears in.)

./rpy/rinterface/_rinterface.c:1336: error: ‘rl_basic_word_break_characters’ undeclared (first use in this function)

./rpy/rinterface/_rinterface.c: In function ‘init_rinterface’:

./rpy/rinterface/_rinterface.c:3688: warning: assignment makes pointer from integer without a cast

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/rpy2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BynTYR-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/rpy2
Storing complete log in /root/.pip/pip.log

      

I know I need something called adns as mentioned elsewhere, but cannot figure out how to install on RedHat. I tried to download it and install it from a file, but it didn't work.

+3


source to share


1 answer


You need to sudo yum install readline-devel

get the readline header files required for the build.



+6


source







All Articles