Installing rpy2 for Python 3 using pip

只愿长相守 提交于 2019-12-07 11:30:23

问题


I am trying to install the rpy2 package for python 3 on Windows 7. So I simply typed pip install rpy2 in the command line. However, it fails for a reason I do not understand, could anyone clear this up please? It threw back the following in the command line:

    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\...\AppData\Local\Temp\pip-build-14jn4kdx\rpy2\

回答1:


There is no official support of windows. The easiest is to install a precompiled binary package, or so I hear. See: http://rpy2.readthedocs.io/en/default/overview.html#microsoft-s-windows-precompiled-binaries




回答2:


Are your R binaries in your PATH variable?

Try this in your command prompt:

path = C:\path\to\R
pip install rpy2



回答3:


it works fine with conda on windows

conda install rpy2


来源:https://stackoverflow.com/questions/38955491/installing-rpy2-for-python-3-using-pip

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!