【问题标题】:rpy2 installation error on Windows 8 (Anaconda)Windows 8 (Anaconda) 上的 rpy2 安装错误
【发布时间】:2014-07-30 14:03:09
【问题描述】:

我在 Windows 8 上安装了最新的 Anaconda Python 发行版,我正在尝试安装 rpy2 包。我最初遇到了几个我能够规避的问题,但现在我遇到了一个我在下面粘贴的特定错​​误。

命令

pip install rpy2

退出并显示以下错误消息:

In file included from .\rpy\rinterface\_rinterface.c:58:0:

.\rpy\rinterface\_rinterface.h:8:15: fatal error: R.h: No such file or
directory

compilation terminated.

error: command 'gcc' failed with exit status 1

有什么建议吗? R.h 的路径包含在我的环境中。

【问题讨论】:

标签: python rpy2 anaconda


【解决方案1】:

博士。 Gohlke 的二进制文件可能是最简单的解决方案。但是您需要更改注册表中的Python 安装路径才能使此方法起作用。相关键位于 HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath 中。将其更改为 anaconda Python 是默认的 python 安装。如果你愿意,你可以随时改回来。

【讨论】:

  • 嗯,这确实有效!我似乎仍然无法弄清楚是什么导致了之前的错误,但我想这已经不是重点了。谢谢:)
  • win 机器上安装rpy2 也很困难。这就是为什么我们都欣赏 Gohlke 博士的二进制文件。 :)
  • 默认值是Python 2.7,要不要改成anaconda python的绝对值?
  • 嗨@CTZhu 我在Linux上遇到了一个类似的错误./rpy/rinterface/_rinterface.c:86:31: fatal error: readline/readline.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1有什么建议吗?
猜你喜欢
  • 1970-01-01
  • 2013-02-25
  • 2018-09-29
  • 2016-02-14
  • 1970-01-01
  • 1970-01-01
  • 2017-07-20
  • 1970-01-01
  • 2017-09-29
相关资源
最近更新 更多