简体   繁体   English

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

[英]rpy2 installation error on Windows 8 (Anaconda)

I have the latest Anaconda Python distribution installed on Windows 8 and I am attempting to install the rpy2 package. 我在Windows 8上安装了最新的Anaconda Python发行版,我正在尝试安装rpy2软件包。 I initially ran into several issues that I was able to circumvent but I'm now stuck on one particular error that I'm pasting below. 我最初遇到了几个我能够规避的问题,但我现在仍然坚持我正在下面粘贴的一个特定错误。

The command 命令

pip install rpy2

exits with the following error message: 退出并显示以下错误消息:

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

Any suggestions? 有什么建议? The path to Rh is included on my environment. Rh的路径包含在我的环境中。

Dr. Gohlke's binary is probably the easiest solution. Gohlke博士的二进制文件可能是最简单的解决方案。 But you need to change the Python installation path in your registry for this method to work. 但是您需要更改注册表中的Python安装路径才能使此方法生效。 The relevant key is in HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath . 相关密钥位于HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Python \\ PythonCore \\ 2.7 \\ InstallPath中 Change it so that the anaconda Python is the default python installation. 更改它,以便anaconda Python是默认的python安装。 You can always change it back if you want. 如果需要,您可以随时更改它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM