我在python中运行以下命令:
from rpy2.robjects.packages import importr
importr( 'ggplot2' )
这在python-2.7.6和rpy2-2.8.3中工作正常。但是,在python-2.7.8和rpy2-2.8.5上运行时会出现以下错误:
/usr/local/lib/python2.7/dist-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so':
/usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so: undefined symbol: R_ClassSymbol
warnings.warn(x, RRuntimeWarning)
Segmentation fault (core dumped)
答案 0 :(得分:0)