rpy2 / rpy2

Interface to use R from Python
https://rpy2.github.io
GNU General Public License v2.0
568 stars 74 forks source link

rpy2 2.1.0beta2 + Ubuntu Karmic -> libR.so not found #39

Closed lgautier closed 4 years ago

lgautier commented 14 years ago

Original report by Anonymous.


I uninstalled rpy2 2.0.8 (installed via easy_installed) and I installed rpy2 2.1.0beta2 from source. Everything built and installed without problems. Attempting to import the package fails with the libR.so error described in the FAQ section. R was installed via the CRAN Ubuntu repository (Karmic)

libR.so is located in /usr/lib/R/lib and /usr/lib/R is correctly returned by the R RHOME command. Inspecting the setup.py build output shows that this folder is being properly indicated via the -L flag for gcc; for a bit of redundancy, explicitly passing this folder to the build process does not alleviate the problem.

Upon switching back to version 2.0.8, the error disappears. I managed to find a .deb for an earlier 2.1.0 alpha build. Installing via this .deb (after uninstalling any other version, of course), resulted in the same libR.so error.

I was able to fix the problem by creating a link to libR.so in /usr/local/lib, as suggested in the FAQ. I'm reporting this as a bug, though, since I only have this problem with 2.1.0 and not with any earlier versions.

lgautier commented 14 years ago

Original comment by Laurent Gautier (Bitbucket: lgautier, GitHub: lgautier).


This smells like an incomplete uninstall. Did you follow the procedure at: http://rpy.sourceforge.net/rpy2/doc-2.1/html/overview.html#upgrading-from-an-older-release-of-rpy2

lgautier commented 14 years ago

Original comment by Laurent Gautier (Bitbucket: lgautier, GitHub: lgautier).


No answer. Being set to "on hold"

lgautier commented 14 years ago

Original comment by Anonymous.


I'm sorry about the lack of response...I found myself in a position where I had to do a lot of coding with python/rpy2 so I couldn't play around with the install!

I just installed the latest beta on a different computer with the same setup (Ubuntu Karmic (well, Linux Mint, but the equivalent version) and rpy2 2.0.8 installed via easy_install). I explicitly followed the directions in the documentation: importing rpy2 and then checking rpy2.path. Only one path was returned: '/usr/local/lib/python2.6/dist-packages/rpy2-2.0.8-py2.6-linux-i686.egg/rpy2'. I first removed rpy2 from the easy_install .pth file by executing 'easy_install -m rpy2'. I then manually removed the .egg file.

I downloaded the beta3 .tar.gz, unzipped it and executed 'python setup.py install'. Within Python I then encountered the same problem: I can do, for example, 'import rpy2' without an error but if I try 'from rpy2 import robjects' I get the libR.so error.

lgautier commented 14 years ago

Original comment by Anonymous.


I'm sorry about the lack of a response but I was in a position where I had to use the library a lot and I couldn't experiment with the installation!

I just repeated the process on a different computer with the exact same setup as the other: Ubuntu Karmic & rpy2 2.0.8 installed via easy_install. I followed the instructions on updating from the documentation by importing rpy2 and checking rpy2.path, which returned only one item: /usr/local/lib/python2.6/dist-packages/rpy2-2.0.8-py2.6-linux-i686.egg/rpy2. I removed rpy2 from the easy_install .pth file by running 'easy_install -m rpy2' and then I manually removed the .egg file. I downloaded the beta3 .tar.gz, executed 'python setup.py install', ran python, and encountered the same libR.so error when I tried 'from rpy2 import robjects'.

lgautier commented 14 years ago

Original comment by Anonymous.


Sorry for the double-post. I'm having issues with bitbucket...

lgautier commented 14 years ago

Original comment by Laurent Gautier (Bitbucket: lgautier, GitHub: lgautier).


Glad to hear that you are relying on rpy2 for heavy work.

The ubuntu component might be out of the equation: rpy2 is largely developed on Ubuntu Karmic and Lucid, and appears to work here. There is might be something specific with your settings.

Sharing more details, for example the text sent to the console when you compile/install the package, could be helpful.

lgautier commented 14 years ago

Original comment by Laurent Gautier (Bitbucket: lgautier, GitHub: lgautier).


Removing version: 2.1.0 (automated comment)

lgautier commented 14 years ago

Original comment by Laurent Gautier (Bitbucket: lgautier, GitHub: lgautier).


No update for three months, and forums talk about libR.so being found in lib64/ rather than lib/. The issue seems independent of rpy2.

I assume that this is either solved or invalid.