[SciPy-User] ImportError: *.so: cannot open shared object file: No such file or directory

Pundurs Mark (Nokia-LC/Chicago) mark.pundurs at nokia.com
Wed Feb 29 11:01:26 EST 2012


Adding to LD_LIBRARY_PATH didn't help. I added /usr/lib (where I can see
the *.so files) but got the same ImportError; then just in case, I added
/tools/python/2.6.3_3/linux_x86_64/lib and
/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages (where
scipy lives) but still got the ImportError.

Any other ideas on how to debug or work around this? (I'm trying to dig
through the sys elements discussed in http://docs.python.org/reference/simple_stmts.html#import,
but it's thorny stuff.)

> Date: Sat, 12 Nov 2011 01:02:19 +0100
> From: Paul Anton Letnes <paul.anton.letnes at gmail.com>
>
> Assuming bash, type this into your shell to export the variable for as
> long as you keep your shell running. If you want it to stick
> permanently, add the line to ~/.bashrc.
>
> export LD_LIBRARY_PATH=/folder/that/contains/libs:$LD_LIBRARY_PATH
>
> Cheers
> Paul
>
> > Thanks, David! How do I (a Linux newbie) add paths to environment
> variable LD_LIBRARY_PATH?
> >
> > Hi Mark,
> >
> > On Wed, Nov 2, 2011 at 3:38 PM, Pundurs, Mark
> <mark.pundurs at navteq.com> wrote:
> >> I want to use the function stats.norm.isf, but no matter how I try
> to import it I end up with the error "ImportError: <libname>.so: cannot
> open shared object file: No such file or directory". The .so files
> cited do exist in /usr/lib (as symbolic links to other .so files that
> also exist in that directory). From what I've read, that's where
> they're supposed to be - but I think the Python installation is in a
> nonstandard location. Is that the problem? How can I work around it?
> >
> > I believe RHEL 4 uses g77 as its default fortran compiler, so you
> have
> > a custom gfortran build somewhere, am I right ?
> >
> > If so, you need to add the paths where libgfortran.so and
> liblapack.so
> > are to the environment variable LD_LIBRARY_PATH. Given that scipy has
> > been built (by someone else for you ?), you may want to ask them
> about
> > it for the exact locations of those libraries.

The information contained in this communication may be CONFIDENTIAL and is intended only for the use of the recipient(s) named above.  If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited.  If you have received this communication in error, please notify the sender and delete/destroy the original message and any copy of it from your computer or paper files.



More information about the SciPy-User mailing list