How do I set up rpy2?
Hi I just download rpy2 and Python 2.6. When I try to run some of example code I found on the internet, I got this error. Can anyone explain why this is happening and how can I fix it? Thanks.
import rpy2.robjects as RO
Traceback (most recent call last):
File "<p开发者_JAVA百科yshell#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.
This might be because R.exe is nowhere in your Path
This sounds like a big clue. Check the value of %PATH%
in your Windows environment. I'd expect this to contain the location of R.EXE
(probably something like C:\Programs\R\R-2.8.0\bin
).
精彩评论