How to install rpy2 via conda using default R installation

℡╲_俬逩灬. 提交于 2019-12-23 12:36:03

问题


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:


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 *



来源:https://stackoverflow.com/questions/31392238/how-to-install-rpy2-via-conda-using-default-r-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!