Home > python, R, ubuntu > Installing rpy2 on Ubuntu

Installing rpy2 on Ubuntu

RPy is a very simple, yet robust, Python interface to the R Programming Language. It can manage all kinds of R objects and can execute arbitrary R functions (including the graphic functions). All errors from the R language are converted to Python exceptions. Any module installed for the R system can be used from within Python. Two flavours are available: rpy and rpy2.” (source)


sudo pip install rpy

It says there is no such package. OK, let’s try version 2:

sudo pip install rpy2

Here I got two errors that terminated the installation:

/usr/bin/ld: cannot find -lblas
/usr/bin/ld: cannot find -llapack

I had to install the following extra packages:

sudo apt-get install libblas-dev liblapack-dev

Now “sudo pip install rpy2” went fine.

I looked up the packages “python-rpy” and “python-rpy2” in Synaptic too. They are there :) Though python-rpy2 was older than the one I got via the pip installation, I could install python-rpy without any problem.


Python and R

Categories: python, R, ubuntu Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: