【问题标题】:Install rpy2 returns an error安装rpy2返回错误
【发布时间】:2018-06-29 08:08:20
【问题描述】:

我正在使用基于 Debian 的 Linux,并尝试使用 pip3 安装 rpy2。

输入时:

sudo pip3 install rpy2

我明白了

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/

我已经安装了pip3,版本是:

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

编辑

一些更新后,我重新运行命令sudo pip3 install rpy2 并得到:

    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/

有什么帮助吗?

【问题讨论】:

  • 错误消息试图帮助您:rpy2 需要 R 版本 3.3 或更高版本,并且您似乎安装了 R 3.1.1。
  • @lgautier 是的,我知道,但那是 R 的更新版本。知道如何获得更高版本吗?
  • 我正在阅读但完全看不懂。可能我在 /etc/apt/sources.list 中没有适当的方向,但不知道如何修改它@lgautier
  • @lgautier 这里有一个关于这个问题的新问题:stackoverflow.com/questions/48360327/…

标签: python rpy2


【解决方案1】:

该软件包多年来一直是发行版的一部分——我是维护者。

就这样吧

  • sudo apt-get install python-rpy2例如 Debian stable 上的 Python 2)
  • sudo apt-get install python3-rpy2(Python 3,随处可用)

它会像往常一样引入所有必需的依赖项。

【讨论】:

    猜你喜欢
    • 2014-02-27
    • 2018-03-04
    • 2015-02-03
    • 1970-01-01
    • 1970-01-01
    • 2014-07-30
    • 2022-01-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多