在Windows 10上安装rpy2时出错

时间:2016-08-28 20:45:57

标签: pip rpy2

在我的计算机上使用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上指明正确的目录?

3 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

  1. 下载AnacondaMiniconda
  2. 在您的终端中运行conda install -c r rpy2

答案 2 :(得分:0)

将环境变量R_HOME添加到您的环境应该有所帮助:

Image