Ubuntu 上的 rpy2 安装
我对 Linux 还很陌生,在安装 Rpy2 时遇到了一些严重的问题。我通过突触包管理器安装了旧版本的 Rpy2,但我需要更新版本并将其删除(如 Rpy2 文档中所述,Rpy2 目录中的所有文件)。 我下载了tar.gz。来自 SourceForge 并运行此代码:
tar -xzf rpy2-2.1.8.tar.gz
cd rpy2-2.1.8
python setup.py build install
它似乎正在按应有的方式复制文件,但随后多页错误消息(以粗体突出显示)开始浮动:
running build_ext
Configuration for R as a library:
include_dirs: ('/usr/share/R/include',)
libraries: ('lapack', 'blas', 'R')
library_dirs: ('/usr/lib/R/lib',)
extra_link_args: ()
# OSX-specific (included in extra_link_args)
framework_dirs: ()
frameworks: ()
building 'rpy2.rinterface.rinterface' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/rpy
creating build/temp.linux-i686-2.6/rpy/rinterface
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
-fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_S
IGJMP=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy/rinterface -I/usr/include/python2.6 -I/usr/share/R/include -c rpy/rinterface/rinterface.c -o build/temp.linux-i686-2.6/rpy/rinterface/rinterface.o
**rpy/rinterface/rinterface.c:55:20: error: Python.h: No such file or directory**
In file included from rpy/rinterface/rinterface.c:74:
/usr/share/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
我希望你能帮助我。
谢谢,莱塞
I'm pretty new to Linux and I'm having some serious trouble installing Rpy2. I had an older versions of Rpy2 installed by the synaptic package manager, but I needed an updated version and removed it (all files in the Rpy2 directory as described in the Rpy2 documentation).
I downloaded the tar.gz. from SourceForge and ran this code:
tar -xzf rpy2-2.1.8.tar.gz
cd rpy2-2.1.8
python setup.py build install
It appeared to be copying files as it should, but then multiple pages of error messages (highlighted in bold) just start floating:
running build_ext
Configuration for R as a library:
include_dirs: ('/usr/share/R/include',)
libraries: ('lapack', 'blas', 'R')
library_dirs: ('/usr/lib/R/lib',)
extra_link_args: ()
# OSX-specific (included in extra_link_args)
framework_dirs: ()
frameworks: ()
building 'rpy2.rinterface.rinterface' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/rpy
creating build/temp.linux-i686-2.6/rpy/rinterface
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
-fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_S
IGJMP=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy/rinterface -I/usr/include/python2.6 -I/usr/share/R/include -c rpy/rinterface/rinterface.c -o build/temp.linux-i686-2.6/rpy/rinterface/rinterface.o
**rpy/rinterface/rinterface.c:55:20: error: Python.h: No such file or directory**
In file included from rpy/rinterface/rinterface.c:74:
/usr/share/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
I hope you can help me.
Thanks, Lasse
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的系统上似乎没有
python-dev
软件包。It looks like you do not have
python-dev
package on your system.