Windows 8(Anaconda)上的rpy2安装错误

时间:2014-06-09 22:53:49

标签: python rpy2 anaconda

我在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的路径包含在我的环境中。

1 个答案:

答案 0 :(得分:5)

博士。 Gohlke的二进制文件可能是最简单的解决方案。但是,您需要更改注册表中的Python安装路径才能使此方法生效。相关密钥位于 HKEY_LOCAL_MACHINE \ SOFTWARE \ Python \ PythonCore \ 2.7 \ InstallPath 中。更改它以使anaconda Python成为默认的python安装。如果需要,您可以随时更改它。