Hello,

I seem to be having an issue similar to that reported in bug#575913

Bug#575913: python-rpy2: ImportError when looking for libR.so

http://us.generation-nt.com/answer/bug-575913-python-rpy2-importerror-when-looking-libr-so-help-196879812.html

For which there seems to have been a fix in R:

http://www.mail-archive.com/debian-bugs-clo...@lists.debian.org/msg274952.html

However, I am seeing the same failure to locate libR.so for a fresh
build of R 2.11.1 and the latest rpy2 (2.1.3).

I didn't have the problem with an earlier version (rpy2-2.0.8), and
indeed I rebuilt 2.0.8 with this same new R install and it works fine.

Specifically:

% export R_HOME=~/R/R-2.11.1/lib64/R
% python setup.py install --prefix=~/python/python-2.6.1

Then:

% python -m 'rpy2.tests'
Traceback (most recent call last):
  File "/usr/contrib/Python-2.6.1/lib/python2.6/runpy.py", line 121,
in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/contrib/Python-2.6.1/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File 
"/users/kmkc980/python/python-2.6.1/lib/python2.6/site-packages/rpy2/tests.py",
line 3, in <module>
    import rpy2.robjects.tests
  File 
"/users/kmkc980/python/python-2.6.1/lib/python2.6/site-packages/rpy2/robjects/__init__.py",
line 14, in <module>
    import rpy2.rinterface as rinterface
  File 
"/users/kmkc980/python/python-2.6.1/lib/python2.6/site-packages/rpy2/rinterface/__init__.py",
line 75, in <module>
    from rpy2.rinterface.rinterface import *
ImportError: libR.so: cannot open shared object file: No such file or directory

If I give it a hint, all is well:

% export LD_LIBRARY_PATH=${R_HOME}/lib:${LD_LIBRARY_PATH}
% python -m 'rpy2.tests'
....................................................
----------------------------------------------------------------------
Ran 275 tests in 4.207s

OK

With the older rpy2 version installed (and without LD_LIBRARY_PATH
being modified), there are a few - seemingly expected - test failures,
but the shared R library is found:

 python -m 'rpy2.tests'
<stuff omitted>
----------------------------------------------------------------------
Ran 172 tests in 0.379s

FAILED (failures=3)

Let me know if there is any additional specifc information I could
provide that would help pinpoint the issue.

Thanks,

-Steve

-----------------------------------------------------------------

% uname -a
Linux xxxx 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03
+0100 x86_64 x86_64 x86_64 GNU/Linux

% python -V
Python 2.6.1

% R
R version 2.11.1 (2010-05-31)

% gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.4
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
--with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap
--with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.4
--enable-linux-futex --without-system-libunwind --with-arch-32=i586
--with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux)

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to