I am able to import R packages using rpy2 as long as they are ones that came
with R. When I try to import packages that I have installed using 
install.packages
after the R installation, it fails:

from rpy2.robjects.packages import importer

sens = importr("sensitivity")
Error : .onLoad failed in loadNamespace() for 'rgl', details:
   call: dyn.load(file, DLLpath = DLLpath, ...)
   error: unable to load shared object
'/scratch/er/dharp/source/R/R-3.0.0_lib/library/rgl/libs/rgl.so':
   /scratch/er/dharp/source/R/R-3.0.0_lib/library/rgl/libs/rgl.so: undefined
symbol: R_NilValue
Failed with error:  ‘package ‘rgl’ could not be loaded’
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object
'/scratch/er/dharp/source/R/R-3.0.0_lib/library/sensitivity/libs/sensitivity.so':
   /scratch/er/dharp/source/epd-7.3-1-rh3-x86_64/lib/libstdc++.so.6: version
`GLIBCXX_3.4.9' not found (required by
/scratch/er/dharp/source/R/R-3.0.0_lib/library/sensitivity/libs/sensitivity.so)
---------------------------------------------------------------------------
RRuntimeError                             Traceback (most recent call last)
/home/dharp/<ipython-input-2-630f99f022a9> in <module>()
----> 1 sens = importr("sensitivity")

/scratch/er/dharp/source/epd-7.3-1-rh3-x86_64/lib/python2.7/site-packages/rpy2/robjects/packages.pyc
in importr(name, lib_loc, robject_translations, signature_translation,
suppress_messages, on_conflict, data)
     304     if _package_has_namespace(rname,
     305                               _system_file(package = rname)):
--> 306         env = _get_namespace(rname)
     307         version = _get_namespace_version(rname)[0]
     308         exported_names = set(_get_namespace_exports(rname))

RRuntimeError: Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object
'/scratch/er/dharp/source/R/R-3.0.0_lib/library/sensitivity/libs/sensitivity.so':
   /scratch/er/dharp/source/epd-7.3-1-rh3-x86_64/lib/libstdc++.so.6: version
`GLIBCXX_3.4.9' not found (required by
/scratch/er/dharp/source/R/R-3.0.0_lib/library/sensitivity/libs/sensitivity.so)

Loading these packages directly into R works fine. Please let me know if you
have any suggestions or comments on this.

Thanks
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to