在Ubuntu上安装rpy2

时间:2011-01-18 11:39:36

标签: ubuntu install rpy2

我对Linux很新,我在安装Rpy2时遇到了一些麻烦。我有一个旧版本的Rpy2由synaptic包管理器安装,但我需要一个更新版本并将其删除(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

我希望你能帮助我。

谢谢,Lasse

1 个答案:

答案 0 :(得分:5)

您的系统上似乎没有python-dev个包。