在我的计算机上使用pip to install rpy2
时出现此错误:
C:\Python27\Scripts>pip install rpy2
Collecting rpy2
Using cached rpy2-2.8.2.tar.gz
Complete output from command python setup.py egg_info:
Warning: Tried to guess R's HOME but no command (R) in the PATH.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\isaac\appdata\local\temp\pip-build-_n5cg0\rpy2\
我认为这只是我计算机上R
目录的错误。如何在pip
上指明正确的目录?
答案 0 :(得分:1)
问题解决,我只需下载rpy2.whl并在此处添加此路径 https://www.reddit.com/r/learnpython/comments/3npm2b/tutorial_how_to_install_rpy2_on_windows_to_bridge/
答案 1 :(得分:1)
答案 2 :(得分:0)
将环境变量R_HOME
添加到您的环境应该有所帮助: