I tried to install rpy2 on Enthought Canopy using pip (on Ubuntu 12.04). The package seems to install successfully but when I try to import it:
In [1]: from rpy2.rinterface._rinterface import *
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-e2e1fe174266> in <module>()
----> 1 from rpy2.rinterface._rinterface import *
/home/kayhan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2-2.3.8-py2.7-linux-x86_64.egg/rpy2/rinterface/__init__.py in <module>()
99
100
--> 101 from rpy2.rinterface._rinterface import *
102
103
ImportError: /home/kayhan/Enthought/Canopy_64bit/User/bin/../lib/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3gf)
Without this this package (rpy2), R_magic in ipython-note book does NOT work!
It seems that the rpy2 is linked to gfortran libraries of the system while Enthought tries to load its own FORTRAN libraries! Similar issue was reported here. LD_PRELOAD is a decent solution because what is the point of shipping Enthought FORTRAN libraries!?
It seems yet another Enthought FORTRAN libraries conflicting with GFORTRAN libraries in linux (Ubuntu)! Either the libraries shipping with Enthough are faulty or there is no decent way to resolve this conflict. Either way, it is not good to have such conflict over and over again for a distribution (Enthought) whose main focus is scientific computing!