use*_*198 11 python windows r rpy2
我正在尝试构建和安装rpy2 Python模块.但是出现了错误(见下文).
我安装了R C:\Program Files\R\R-2.15.0\并R.h进入C:\Program Files\R\R-2.15.0\include.如何告诉setup.py在该目录中找到R头?
Python和R都是使用Windows 64bit的官方二进制文件安装的.
有人可以为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)
Run Code Online (Sandbox Code Playgroud)
使用此配置将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: ()
Run Code Online (Sandbox Code Playgroud)
使用以下命令构建'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
Run Code Online (Sandbox Code Playgroud)
给出了这个错误:
.\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
Run Code Online (Sandbox Code Playgroud)
我自己也在经历同样的事情。找到的库等表明您正在选择 32 位版本 i386。添加“C:\Program Files\R\R-2.15.1\include”包含目录可能有助于强制修复问题。这是我最远的距离:
building 'rpy2.rinterface._rinterface' extension
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
使用 MSVC Express shell 以及路径中的 R x64 和 msys sh。
| 归档时间: |
|
| 查看次数: |
7206 次 |
| 最近记录: |