安装 rpy2 返回错误 [英] Install rpy2 returns an error

查看:74
本文介绍了安装 rpy2 返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

输入时:

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,版本是:

I have pip3 installed, the version is:

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

编辑

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

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/

有什么帮助吗?

推荐答案

这个包多年来一直是发行版的一部分——我是维护者.

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

就这样吧

  • sudo apt-get install python-rpy2(Python 2 on e.g. Debian stable)
  • sudo apt-get install python3-rpy2(Python 3,随处可用)
  • 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.

这篇关于安装 rpy2 返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆