加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

在Windows上安装rpy2时出错

发布时间:2020-12-14 04:07:41 所属栏目:Windows 来源:网络整理
导读:我正在尝试安装rpy2包并获得以下错误 C:python27easy_install rpy2Searching for rpy2Reading http://pypi.python.org/simple/rpy2/Reading http://rpy.sourceforge.netBest match: rpy2 2.3.3Downloading http://pypi.python.org/packages/source/r/rpy2/r
我正在尝试安装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.3setup.py -q bdist_egg --dist-dir c:userschetan~1appdatalocaltempeasy_install-wfxip9rpy2-2.3.3egg-di
st-tmp-rrezfb
"C:PROGRA~2RR-28~1.0binR" CMD config --ldflags
Invalid substring

in string

C:Python27libsite-packagessetuptoolscommandeasy_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~2RR-28~1.0binR" CMD config --ldflags`

当我尝试pip时,这就是我得到的

c:Python27Libsite-packagesdjangobin>pip install rpy2

下载/解压缩rpy2
运行包rpy2的setup.py egg_info

"C:PROGRA~2RR-28~1.0binR" CMD config --ldflags
Invalid substring

in string

Problem while running `"C:PROGRA~2RR-28~1.0binR" CMD config --ldflags`
我也花了几天时间……然后我偶然发现了 this thread,其中给出了一个链接: http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2

在此页面上,您可以找到(以及其他有用的东西)rpy2 for Windows的预编译版本,以及不同版本的Python.它显然只适用于R 2.15.3,我没有尝试与其他版本.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读