在redhat上安装rpy

时间:2014-08-26 10:55:29

标签: python r redhat rpy2

我是RedHat的新手,但已经使用Ubuntu了一段时间。我正在尝试使用pip install rpy2安装rpy2,我收到错误

/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

我知道我需要一些名为adns的东西,如其他地方所述,但无法弄清楚如何在RedHat上安装。我尝试下载并从文件安装但是没有用。

1 个答案:

答案 0 :(得分:6)

您需要sudo yum install readline-devel来获取构建所需的readline头文件。