I'm trying to install rpy2
inside a Watson Studio 'environment':
!pip install rpy2
However, the environments don't appear to have R available:
Collecting rpy2
Downloading https://files.pythonhosted.org/packages/f1/98/c7652cc9d7fc0afce74d2c30a52b9c9ac391713a63d037e4ab8feb56c530/rpy2-2.9.4.tar.gz (194kB)
100% |████████████████████████████████| 204kB 4.4MB/s eta 0:00:01
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 /home/dsxuser/.tmp/pip-build-t7_r6q8e/rpy2/
How can I install rpy2 inside a Watson Studio Python 'Enviroment'? Is this possble?
Note: Watson Studio Environments are custom containers, so an answer should only be provided if the answer is known to work on Watson Studio Environments.
Use
conda
instead ofpip
. It knows how to install the R runtime. But beware, there are many packages that need to be installed...!conda install rpy2
Fetching package metadata ........... Solving package specifications: .
Package plan for installation in environment /opt/conda/envs/DSX-Python35:
The following NEW packages will be INSTALLED:
The following packages will be UPDATED: