Install rpy2 with custom R installation -
i have custom installation of r in
~/r-3.2.2/bin/
when run
sudo pip install rpy2
i
warning: tried guess r's home no command (r) in path. traceback (most recent call last): file "<string>", line 17, in <module> file "/tmp/pip-build-itkmkr/rpy2/setup.py", line 330, in <module> ri_ext = getrinterface_ext() file "/tmp/pip-build-itkmkr/rpy2/setup.py", line 231, in getrinterface_ext r_home = _get_r_home() file "/tmp/pip-build-itkmkr/rpy2/setup.py", line 63, in _get_r_home r_home = r_home.split(os.linesep) unboundlocalerror: local variable 'r_home' referenced before assignment
i have found no answer problem, though appears in several posts. here tried
add r executable path
export path=$path:/home/r-3.2.2/bin/ did not work
export r_home same value: did not work
echo export path=$path:/home/r-3.2.2/bin/ >> ~/.bashrc source ~/.bashrc
did not work.
on other hand "problem" seems solved here https://bitbucket.org/rpy2/rpy2/issues/283/rpy2-installation-error-when-r-output
how install rpy2 correctly?
the error because of issue in rpy2 (just fixed). otherwise, might because r either not in path think is, or may not have permission run it.
try:
# assert r executable think ~/r-3.2.2/bin/r --version # set path export path=${path}:~/r-3.2.2/bin/ # unset r_home if needed unset r_home # install rpy2 pip install rpy2
Comments
Post a Comment