Red Hat Bugzilla – Bug 446799
import of scipy failed
Last modified: 2008-05-16 18:50:12 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008043010 Fedora/3.0-0.60.beta5.fc9 Firefox/3.0b5
Description of problem:
import of scipy failed as the following:
>>> import scipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/scipy/__init__.py", line 25, in <module>
from numpy import show_config as show_numpy_config
File "/usr/lib/python2.5/site-packages/numpy/__init__.py", line 43, in <module>
File "/usr/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in <module>
from linalg import *
File "/usr/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in <module>
from numpy.linalg import lapack_lite
ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. invoke python
2. >>> import scipy
3. ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory
scipy not available/usable.
no error message, scipy usable.
libgfortran-4.3.0-8.i386 is installed in the system. Looking into a machine running Fedora 8, it seems that libgfortran-so.1 is contained in older packages such as libgfortran-4.1.2-33.
you'll notice that the error is actually associated with numpy and scipy is just
triggering it by internally importing numpy components.
rpm -q numpy
rpm -q atlas
rpm -q --requires atlas |grep fortran
rpm -q --whatprovides libfortran.so.1
On my F9 preview system... compat-libgfortran-41 was pulled in to fill the
libgfortran.so.1 that atlas needs... and numpy needs atlas.
Now somehow for F9 gold the atlas from F8 is still shipped. A new atlas is in
updates-testing now that doesn't require the compat-libgfortran-41 package.
However, assuming you have the atlas from F9 gold installed, i do not understand
why compat-libgfortran-41 was not installed on your system to fill the necessary
libgfortran.so.1 requirement that atlas needs.
Installing compat-libgfortran-41 should fix the problem.
In any event the problem isn't scipy specific. At worst its a numpy problem,
though its most likely atlas on your system, but you would need to confirm that
on your system by diagnosing whether the deps of the atlas package are filled
correctly using the instructions I've given above.
And I have confirmation that the new atlas in updates-testing is built against
the newer libgfortran package and that scipy imports as expected using it.
I'm going to close this bug, if after updating your atlas you still have a
problem feel free to re-open it and I'll help you direct the report to the right
> you'll notice that the error is actually associated with numpy and scipy is just
> triggering it by internally importing numpy components.
> rpm -q numpy
> rpm -q atlas
> rpm -q --requires atlas |grep gfortran
> rpm -q --whatprovides libfortran.so.1
no package provides libgfortran.so.1
> However, assuming you have the atlas from F9 gold installed, i do not understand
> why compat-libgfortran-41 was not installed on your system to fill the necessary
> libgfortran.so.1 requirement that atlas needs.
Neither do I.
> Installing compat-libgfortran-41 should fix the problem.
Yes, after installing it scipy/numpy can be imported.
Just an additional report.