Python rpy2安装
我安装了RPY2,当我尝试导入它时,我得到以下错误Python rpy2安装,python,r,rpy2,Python,R,Rpy2,我安装了RPY2,当我尝试导入它时,我得到以下错误 Unable to determine R version from the registry. Trying another method. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import rpy File "C:\Python27\lib\site-packages\rpy.py",
Unable to determine R version from the registry. Trying another method.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import rpy
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.
无法从注册表中确定R版本。尝试另一种方法。
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
导入rpy
文件“C:\Python27\lib\site packages\rpy.py”,第53行,在
RHOME=rpy\u tools.get\u R\u HOME()
文件“C:\Python27\lib\site packages\rpy\u tools.py”,第57行,在get\u R\u HOME中
raise RUNTIMERROR(“无法执行R解释器。\n”
RuntimeError:无法执行R解释器。
检查R是否在执行路径中。
我非常确定我需要将C:\Program Files\R\R-3.0.2\bin添加到一个路径中,以便python知道如何使用R,但我不确定如何添加,或者添加到哪个路径
如果您将其添加到路径中,我可以访问,但我已丢失。请有人帮助我。rpy已被弃用多年。请尝试rpy2。当我尝试轻松安装rpy2时,我收到错误:安装脚本退出,错误:尝试猜测R的主页,但路径中没有R命令。此答案可能会帮助您: