如何使用默认R安装通过conda安装rpy2 [英] How to install rpy2 via conda using default R installation

查看:278
本文介绍了如何使用默认R安装通过conda安装rpy2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu linux上使用Anaconda Python发行版,并想在IPython笔记本中使用R魔术.有没有一种方法可以用conda发行版安装rpy2并在/usr/bin/R中使用我当前的默认R安装?我的目标是保持当前的R安装不变,而无需通过conda安装R或其他R软件包.

I use the Anaconda Python distribution on Ubuntu linux and would like to use R magics in IPython notebooks. Is there a way to install rpy2 with the conda distribution and use my current default R installation at /usr/bin/R? My goal is to keep the current R installation as is without installing R or other R packages via conda.

已安装此

This response to a related question suggests using a recipe for doing so on mac, but doesn't work for me:

conda skeleton pypi rpy2
conda build rpy2
conda install rpy2 --use-local

build命令产生以下错误:

The build command yields the follow error:

Error: No packages found in current linux-64 channels matching:  singledispatch

我可以通过binstar安装singledispatch:

I can install singledispatch via binstar:

conda install -c https://conda.binstar.org/asmeurer singledispatch

conda list | grep "singledispatch"
singledispatch            3.4.0.3                  py27_1

但是关于当前linux-64频道中没有找到软件包,我会遇到同样的错误.

But I get the same error regarding there being no packages found in current linux-64 channels.

推荐答案

我在未正确安装软件包时遇到了类似的问题,我建议改用apt代替conda

I had a similar issue with the package not installing in the proper place, I would recommend instead using apt instead of conda

sudo apt安装python-rpy2

sudo apt install python-rpy2

*请注意,对rpy2的官方支持已从2.7开始终止*

这篇关于如何使用默认R安装通过conda安装rpy2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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