Install rpy2 returns an error

柔情痞子 提交于 2020-01-11 10:39:26

问题


I am using Linux, Debian based, and trying to install rpy2 with pip3.

When type:

sudo pip3 install rpy2

I get

user@huayra:~$ sudo pip3 install rpy2
Collecting rpy2
  Using cached rpy2-2.9.2.tar.gz
    Complete output from command python setup.py egg_info:
    Error: 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 /tmp/pip-build-r6axcg8n/rpy2/

I have pip3 installed, the version is:

pip 9.0.1 from /usr/local/lib/python3.4/dist-packages (python 3.4)

EDIT

After some updates I re-run the command sudo pip3 install rpy2 and get:

    Error: R >= 3.3 required (and the R we found is '3.1.1').
    R version 3.1.1 (2014-07-10) -- "Sock it to Me"     
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3n_yfk5i/rpy2/

Any help please?


回答1:


That package has been part of the distribution for many years -- I'm the maintainer.

So just do

  • sudo apt-get install python-rpy2 (Python 2 on e.g. Debian stable)
  • sudo apt-get install python3-rpy2 (Python 3, available everywhere)

and it will bring all required dependencies in as usual.



来源:https://stackoverflow.com/questions/48352018/install-rpy2-returns-an-error

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