I reinstalled R and rpy2 after installing Enthought Canopy python.
In python I can now:
import rpy2
without an error message. However, when I want to import any specific rpy2 modules, I get the following error:
import rpy2.robjects
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-bd461266c9bc> in <module>()
----> 1 import rpy2.robjects
/Users/martinkampmann/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/rpy2-2.3.5-py2.7-macosx-10.6-i386.egg/rpy2/robjects/__init__.py in <module>()
13 import itertools
14 from datetime import datetime
---> 15 import rpy2.rinterface as rinterface
16 import rpy2.rlike.container as rlc
17
/Users/martinkampmann/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/rpy2-2.3.5-py2.7-macosx-10.6-i386.egg/rpy2/rinterface/__init__.py in <module>()
99
100
--> 101 from rpy2.rinterface._rinterface import *
102
103
ImportError: dlopen(/Users/martinkampmann/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/rpy2-2.3.5-py2.7-macosx-10.6-i386.egg/rpy2/rinterface/_rinterface.so, 2): Symbol not found: _R_BaseEnv
Referenced from: /Users/martinkampmann/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/rpy2-2.3.5-py2.7-macosx-10.6-i386.egg/rpy2/rinterface/_rinterface.so
Expected in: flat namespace
in /Users/martinkampmann/Library/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/rpy2-2.3.5-py2.7-macosx-10.6-i386.egg/rpy2/rinterface/_rinterface.so