How to install rpy2 via conda using default R inst

2019-06-27 08:57发布

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

The build command yields the follow error:

Error: No packages found in current linux-64 channels matching:  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

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

1条回答
孤傲高冷的网名
2楼-- · 2019-06-27 09:15

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 install python-rpy2

edit: * note official support for rpy2 has been discontinued for 2.7 *

查看更多
登录 后发表回答