I'm running Python v2.7.8
and R v3.0.2 (2013-09-25) -- "Frisbee Sailing"
on my elementary OS Freya 64 bit (based on Ubuntu 14.04).
I'm trying to install the rpy2
package with:
pip install rpy2
and it fails with the error:
Failed building wheel for rpy2
Down below I also see:
error: command 'gcc' failed with exit status 1
The full output is here.
I've already tried:
sudo apt-get install python-dev libevent-dev python3-dev
but the error remains.
I know pip
works because I've already installed numpy
, matplotlib
, scipy
, and other packages using it.
Found the answer in this post. I just had to upgrade R from v3.0.2
to the latest version available for my system (v3.2.1
).
sudo apt-get remove r-base-core
Edit the sources.list file
sudo gedit /etc/apt/sources.list
Add following entry (for Ubuntu 14.04):
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
pip install rpy2