python - 在 redhat 上安装 rpy

标签 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 上安装它。我尝试下载它并从文件安装,但这没有用。

最佳答案

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

关于python - 在 redhat 上安装 rpy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25504087/

相关文章:

python - PyGtk CellRendererCombo 使用 Pixbuf

R Shiny - 使用 slider 值不保留小数位

r - 矩阵的成对偏相关,由一个变量控制

haskell - 在 Red Hat 上从源代码安装 Haskell Platform 2014 的官方方法是什么?

python - 检查字符串是否与 python 中的模式匹配的最有效方法?

python - client.get_bucket() 失败,但仅来自云数据流(计算引擎)

python - 在 Scrapy 中将列表作为参数传递

r - 如何在R中绘制高斯图模型

java - Apache Zookeeper多节点通信错误

linux - 你如何着手将修复程序放入 linux 包中?