我正在尝试构建和安装rpy2 Python模块。但是遇到了错误(见下文)。
我已经在 C:\Program Files\R\R-2.15.0\
中安装了R,并且 R.h
在 C:\Program Files\R\R-2.15.0\include
中。我如何告诉setup.py在该目录中查找R头文件?
Python和R都是使用Windows 64位的官方二进制文件安装的。
有人可以为Windows 64位和Python2.7 64位贡献一个rpy2二进制构建吗?Christoph Gohlke表示由于法律或技术原因,rpy2未包含在他的非官方Windows二进制扩展包中。还有其他人成功了吗?
谢谢!
给定以下流程:
$ python setup.py build
running build
running build_py
running build_ext
returned an empty string. (5 times)
使用以下配置将R作为库:
include_dirs: ()
libraries: ()
library_dirs: ('C:/PROGRA~1/R/R-215~1.0/bin/i386',)
extra_link_args: ()
# OSX-specific (included in extra_link_args)
framework_dirs: ()
frameworks: ()
使用以下命令构建 'rpy2.rinterface._rinterface' 扩展:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c
/nologo /Ox /MD /W3 /GS- /DNDEBUG -DWin32=1 -DCSTACK_DEFNS=1
-I.\rpy\rinterface -IC:\Python27\include -IC:\Python27\PC
/Tc.\rpy\rinterface\_rinterface.c
/Fobuild\temp.win-amd64-2.7\Release\.\rpy\rinterface\_rinterface.obj
_rinterface.c
会提示这个错误:
.\rpy\rinterface\_rinterface.c(61) : fatal error C1083: Cannot open include file:
'R.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"'
failed with exit status 2