导入rpy会出错

时间:2013-09-16 16:55:59

标签: python r

我尝试使用http://sourceforge.net/projects/rpy/files/latest/download?source=directory

上的下载来安装rpy

我收到此错误:

from rpy import *
Unable to determine R version from the registry. Trying another method.

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    from rpy import *
  File "C:\Python27\lib\site-packages\rpy.py", line 53, in <module>
    RHOME = rpy_tools.get_R_HOME()
  File "C:\Python27\lib\site-packages\rpy_tools.py", line 57, in get_R_HOME
    raise RuntimeError("Couldn't execute the R interpreter.\n"
RuntimeError: Couldn't execute the R interpreter.
Check whether R is in the execution path.

为什么要这样做?我怎么能阻止它?

1 个答案:

答案 0 :(得分:0)

在安装R期间,会显示一个复选框,为您提供将R版本号添加到注册表的选项。

也许你没有检查过?重新安装R可能会有所帮助。

enter image description here