ImportError: *.so: cannot open shared object file: No such file or directory
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? Is there some way I can stitch together pieces of Scipy code in my script to directly access stats.norm.isf functionality and bypass these problems? I'm running Scipy 0.8.0/Python 2.6.3 under Red Hat Enterprise Linux ES release 4 (Nahant Update 5) on a Dell PowerEdge 1950. Traceback (most recent call last): File "/disk1/hadoop/tmp/taskTracker/jobcache/job_201109081055_6643/attempt_201109081055_6643_r_000000_0/work/./ExpandAndAverageFinal_ReducerB_pc.py", line 13, in <module> from scipy.stats import norm File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module> from stats import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/stats.py", line 203, in <module> import scipy.linalg as linalg File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/__init__.py", line 9, in <module> from basic import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/basic.py", line 16, in <module> from lapack import get_lapack_funcs File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/lapack.py", line 14, in <module> from scipy.linalg import flapack ImportError: liblapack.so: cannot open shared object file: No such file or directory Traceback (most recent call last): File "/disk1/hadoop/tmp/taskTracker/jobcache/job_201109081055_6658/attempt_201109081055_6658_r_000000_0/work/./ExpandAndAverageFinal_ReducerB_pc.py", line 13, in <module> from scipy.stats.norm import isf File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module> from stats import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/stats.py", line 202, in <module> import scipy.special as special File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/special/__init__.py", line 8, in <module> from basic import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/special/basic.py", line 6, in <module> from _cephes import * ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory Thanks, Mark Pundurs Data Analyst - Traffic Nokia Location & Commerce, Chicago 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.
On Wed, Nov 2, 2011 at 11:38 AM, Pundurs, Mark <mark.pundurs@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?
Is there some way I can stitch together pieces of Scipy code in my script to directly access stats.norm.isf functionality and bypass these problems?
No it won't be possible if you cannot run (Fortran) extensions. norm.isf uses scipy.special, which uses _cephes. Josef
I'm running Scipy 0.8.0/Python 2.6.3 under Red Hat Enterprise Linux ES release 4 (Nahant Update 5) on a Dell PowerEdge 1950.
Traceback (most recent call last): File "/disk1/hadoop/tmp/taskTracker/jobcache/job_201109081055_6643/attempt_201109081055_6643_r_000000_0/work/./ExpandAndAverageFinal_ReducerB_pc.py", line 13, in <module> from scipy.stats import norm File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module> from stats import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/stats.py", line 203, in <module> import scipy.linalg as linalg File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/__init__.py", line 9, in <module> from basic import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/basic.py", line 16, in <module> from lapack import get_lapack_funcs File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/linalg/lapack.py", line 14, in <module> from scipy.linalg import flapack ImportError: liblapack.so: cannot open shared object file: No such file or directory
Traceback (most recent call last): File "/disk1/hadoop/tmp/taskTracker/jobcache/job_201109081055_6658/attempt_201109081055_6658_r_000000_0/work/./ExpandAndAverageFinal_ReducerB_pc.py", line 13, in <module> from scipy.stats.norm import isf File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module> from stats import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/stats/stats.py", line 202, in <module> import scipy.special as special File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/special/__init__.py", line 8, in <module> from basic import * File "/tools/python/2.6.3_3/linux_x86_64/lib/python2.6/site-packages/scipy/special/basic.py", line 6, in <module> from _cephes import * ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory
Thanks, Mark Pundurs Data Analyst - Traffic Nokia Location & Commerce, Chicago
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. _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
Hi Mark, On Wed, Nov 2, 2011 at 3:38 PM, Pundurs, Mark <mark.pundurs@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. cheers, David
participants (3)
-
David Cournapeau
-
josef.pktd@gmail.com
-
Pundurs, Mark