On 02/18/2014 08:37 PM, Nik Krumm wrote: > Hi all, > > After attempting to upgrade R, I now for the life of me cannot get rpy2 to > interface. Installation of R and rpy2 do proceed (though some warnings on > compile there, see below), but then this happens when importing `robjects`: > > 05:19:21 ~$ python -c "import rpy2.robjects" > Traceback (most recent call last): > File "<string>", line 1, in <module> > File > "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/robjects/__init__.py", > line 15, in <module> > import rpy2.rinterface as rinterface > File > "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/__init__.py", > line 101, in <module> > from rpy2.rinterface._rinterface import * > ImportError: > dlopen(/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/_rinterface.so, > 2): Symbol not found: _R_BaseEnv > Referenced from: > /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/_rinterface.so > Expected in: flat namespace > in > /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/_rinterface.so > > I am running the following versions: > - R 3.02 (Platform: x86_64-apple-darwin10.8.0 (64-bit)) downloaded from > CRAN, though I have tried various compile-from-source options. > - Python 2.7.3 (Enthought) > - Mac OS X 10.6.8 with gcc 4.2.1
There are sporadic reports of problem with Enthought's Python + OS X (for example http://stackoverflow.com/questions/16220465/importing-rpy2-modules-in-enthought-canopy-python ). No explanation for the problem though. IIRC the resolution is to compile Python on the machine (homebrew makes the process relatively painless). > > I've tried a couple different releases of rpy2, all have the same effect. > > I've also tried the hint in the docs: > env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build install > ... but this has no different effects. > > However, I can get a different error I specify "-arch x86_64" ONLY: > > 05:30:13 ~$ python -c "import rpy2.robjects" > Traceback (most recent call last): > File "<string>", line 1, in <module> > File > "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/robjects/__init__.py", > line 15, in <module> > import rpy2.rinterface as rinterface > File > "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/__init__.py", > line 101, in <module> > from rpy2.rinterface._rinterface import * > ImportError: dynamic module does not define init function (init_rinterface) > > > >From the installation_log.txt (attached), a snippet containing warnings > >potentially interesting: > > /Library/Frameworks/Python.framework/Versions/7.3/include/python2.7/pymacconfig.h:56:1: > warning: this is the location of the previous definition > ld: warning: in /Library/Frameworks/R.framework/Resources/lib/libR.dylib, > file was built for unsupported file format which is not the architecture > being linked (i386) > /Library/Frameworks/Python.framework/Versions/7.3/include/python2.7/pymacconfig.h:56:1: > warning: this is the location of the previous definition > ld: warning: in /Library/Frameworks/R.framework/Resources/lib/libR.dylib, > file was built for unsupported file format which is not the architecture > being linked (i386) > > Thank you VERY much for any help, > Nik > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list