[Rcpp-devel] Rcpp and rpy2
Jonas Rauch
jonas.rauch at googlemail.com
Fri Aug 12 10:36:12 CEST 2011
Is Rcpp compatible with rpy2?
I would like to call a very complex R function from python. My function
depends on code implemented with Rcpp. When I try to load Rcpp from python
via
import rpy2.robjects as robjects
robjects.r('library(Rcpp)')
I get the following:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object
'/home/jonas/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/libs/Rcpp.so':
/home/jonas/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/libs/Rcpp.so:
undefined symbol: R_ClassSymbol
Error: package/namespace load failed for 'Rcpp'
Traceback (most recent call last):
File "RcppTest.py", line 2, in <module>
robjects.r('library(Rcpp)')
File
"/usr/local/lib/python2.7/dist-packages/rpy2-2.2.2dev_20110811-py2.7-linux-x86_64.egg/rpy2/robjects/__init__.py",
line 225, in __call__
res = self.eval(p)
File
"/usr/local/lib/python2.7/dist-packages/rpy2-2.2.2dev_20110811-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py",
line 82, in __call__
return super(SignatureTranslatedFunction, self).__call__(*args,
**kwargs)
File
"/usr/local/lib/python2.7/dist-packages/rpy2-2.2.2dev_20110811-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py",
line 34, in __call__
res = super(Function, self).__call__(*new_args, **new_kwargs)
rpy2.rinterface.RRuntimeError: Error: package/namespace load failed for
'Rcpp'
More information about the Rcpp-devel
mailing list