I am trying to install rpy2 and I am facing a common issue. Unfortunately all the solution I have found are for win7
I have installed a Python 2.7 and R 2.15. then I write on the terminal
easy_install rpy2
or, alternatively
pip install rpy2
Same result:
Tried to guess R's HOME but no R command in the PATH
What I should do?
Make sure you have R installed
brew install r
Then install rpy
pip install rpy2
The rpy2 code is doing the wrong check. R might be perfectly fine, but rpy2 is using an unreliable check.
To check for R
, the rpy2
uses subprocess.check_output
. However, that was introduced (AFAIK) in python 2.7.
If you're using a version of python less than 2.7 then you should update to at least 2.7.
If you must use python 2.6, then you should look at this answer to see how to force subprocess.check_output
into python 2.6, finally allowed you to install rpy2
. This is what I had to do as I was unable to update the version of python.
Download the rpy2
code, and edit its setup.py
and insert the code from that answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With