gpt4 book ai didi

python - 安装 rpy2 返回错误

转载 作者:太空宇宙 更新时间:2023-11-04 02:34:04 24 4
gpt4 key购买 nike

我正在使用基于 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/

有什么帮助吗?

最佳答案

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

就这样吧

  • sudo apt-get install python-rpy2(Python 2 on e.g. Debian stable)
  • sudo apt-get install python3-rpy2(Python 3,随处可用)

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

关于python - 安装 rpy2 返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48352018/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com