嗨,我刚刚下载了rpy2和Python2.6。当我尝试运行我在互联网上找到的一些示例代码时,我得到了这个错误。有没有人能解释为什么会发生这种情况,以及我如何修复它?谢谢。
import rpy2.robjects as RO
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import rpy2.robjects as RO
File "C:\Python26\lib\site-packages\rpy2\robjects\__init__.py", line 12, in <module>
import rpy2.rinterface as rinterface
File "C:\Python26\lib\site-packages\rpy2\rinterface\__init__.py", line 22, in <module>
"This might be because R.exe is nowhere in your Path.")
RuntimeError: Unable to determine R version from the registery.Calling the command 'R RHOME' does not return anything.
This might be because R.exe is nowhere in your Path.发布于 2010-07-31 14:16:56
这可能是因为R.exe不在你的路径中
这听起来像是一条大线索。检查Windows环境中%PATH%的值。我希望它包含R.EXE的位置(可能类似于C:\Programs\R\R-2.8.0\bin)。
https://stackoverflow.com/questions/3376867
复制相似问题