【问题标题】:How do I set up rpy2?如何设置 rpy2?
【发布时间】:2010-07-31 04:55:33
【问题描述】:

您好,我刚刚下载了 rpy2 和 Python 2.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.

【问题讨论】:

    标签: python r


    【解决方案1】:

    这可能是因为 R.exe 不存在 在你的路径中

    这听起来像是一个很大的线索。在您的 Windows 环境中检查 %PATH% 的值。我希望这包含R.EXE 的位置(可能类似于C:\Programs\R\R-2.8.0\bin)。

    【讨论】:

    猜你喜欢
    • 2020-08-20
    • 1970-01-01
    • 2013-05-28
    • 2017-04-06
    • 2012-09-23
    • 1970-01-01
    • 2020-07-07
    • 1970-01-01
    相关资源
    最近更新 更多