I am trying to fix the error related to pandas.rpy.common
like this:
# activate python 2.7 env
$ source activate py27
# this says requirements satisfied
$ pip install rpy2
Requirement already satisfied: rpy2 in ./lib/python2.7/site-packages
Requirement already satisfied: singledispatch in ./lib/python2.7/site-packages/singledispatch-3.4.0.3-py2.7.egg (from rpy2)
Requirement already satisfied: six in ./lib/python2.7/site-packages (from rpy2)
# test if rpy2, pandas is installed
$ cat test.py
import rpy2 # ok
import pandas # ok
import pandas.rpy.common # this line throws an error
# run the script
$ python test.py
Traceback (most recent call last):
File "/home/rathik/test.py", line 3, in <module>
import pandas.rpy.common
ImportError: No module named rpy.common
I have read some related questions, set my R_HOME
and R_USER
but nothing is working:
$ echo $R_HOME
/home/rathik/tools/miniconda3/envs/py27/bin/R
$ echo $R_USER
/home/rathik/tools/miniconda3/envs/py27/lib/python2.7/site-packages/rpy2
Any help would be much appreciated.
Thanks!