![]() |
John VanDyk has been innovating with information technology for more than 20 years. Read more... |
Installing rpy and rpy2 on RHEL6
I wanted to install rpy and rpy2 on Red Hat Enterprise Linux 6. Here's how I did it. There have been several fixes in the rpy SVN repository that have not shown up in the version downloadable from SourceForge. Hopefully that's been fixed by now, but here's how I installed it by retrieving rpy directly from the repository.
First I made sure that the python-devel package was installed to avoid the error src/RPy.h:63:20: error: Python.h: No such file or directory
:
yum install python-devel
Then I installed R and R-devel from EPEL:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
yum install R R-devel
Then I downloaded rpy and extracted it:
curl http://rpy.svn.sourceforge.net/viewvc/rpy/trunk/rpy/?view=tar > rpy.tar.gz
tar xvzf rpy.tar.gz
cd rpy
python setup.py install
Lo and behold, it imports without error:
python -c "import rpy"
Yay!
Besides R and R-devel, rpy2 requires that the readline-devel package be installed, otherwise installation fails with ./rpy/rinterface/_rinterface.c:79:31: error: readline/readline.h: No such file or directory
.
yum install readline-devel
After that, rpy2 installs easily:
curl http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.0.tar.gz#md5=a42a7f1e6ddb10dc3a1886c2f4309fab > rpy2-2.2.0.tar.gz
tar xvzf rpy2-2.2.0.tar.gz
cd rpy2-2.2.0
python setup.py install
- Log in to post comments
Comments
Thank ye.
For it is useful and scores high on the usability-scale. Many thanks, good sir.
Thank you for this. Saved me
Thank you for this. Saved me much head-scratching!