我正在尝试安装rpy2包并获得以下错误
C:\python27>easy_install rpy2 Searching for rpy2 Reading http://pypi.python.org/simple/rpy2/ Reading http://rpy.sourceforge.net Best match: rpy2 2.3.3 Downloading http://pypi.python.org/packages/source/r/rpy2/rpy2-2.3.3.tar.gz#md5=6cd95eb70645577cb53198ef0a32395e Processing rpy2-2.3.3.tar.gz Running rpy2-2.3.3\setup.py -q bdist_egg --dist-dir c:\users\chetan~1\appdata\local\temp\easy_install-wfxip9\rpy2-2.3.3\egg-di st-tmp-rrezfb "C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags Invalid substring in string C:\Python27\lib\site-packages\setuptools\command\easy_install.py:921: RuntimeWarning: tp_compare didn't return -1 or -2 for ex ception raise DistutilsError("Setup script exited with %s" % (v.args[0],)) error: Setup script exited with Problem while running `"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags`
当我尝试pip时,这就是我得到的
c:\Python27\Lib\site-packages\django\bin>pip install rpy2
下载/解压缩rpy2
运行包rpy2的setup.py egg_info
"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags Invalid substring in string Problem while running `"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags`
我也花了几天时间……然后我偶然发现了
this thread,其中给出了一个链接:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2
原文链接:https://www.f2er.com/windows/365227.html在此页面上,您可以找到(以及其他有用的东西)rpy2 for Windows的预编译版本,以及不同版本的Python.它显然只适用于R 2.15.3,我没有尝试与其他版本.