python-numpy fails to import

Asked by Tobias Gresch

Hello,

I am trying to import numpy in python after upgrading from hardy to intrepid:

toby@ubuntu:~$ python
Python 2.5.2 (r252:60911, Aug 6 2008, 09:17:42)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/numpy/__init__.py", line 103, in <module>
    import linalg
  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 29, in <module>
    from numpy.linalg import lapack_lite
ImportError: /usr/lib/atlas/liblapack.so.3gf: undefined symbol: _gfortran_pow_r8_i4
>>>

Apparently there is a linking problem, maybe related to bug: 261089 (Atlas blas and lapack libraries unware of gfortran dependency)

Can anybody reproduce this error or is it just my installation that is broken?

Best regards,
  Tobias Gresch

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu python-numpy Edit question
Assignee:
No assignee Edit question
Solved by:
Albert Damen
Solved:
Last query:
Last reply:
Revision history for this message
Best Albert Damen (albrt) said :
#1

Yes, I can reproduce this on a clean i386 system. On an amd64 system all works fine.
The reason is atlas fails to build on i386, but was successfully built on amd64.
Therefore the libatlas3gf-base version you need is not available on i386 yet.

$ rmadison libatlas3gf-base
libatlas3gf-base | 3.6.0-21.1ubuntu3 | hardy/universe | amd64, i386
libatlas3gf-base | 3.6.0-21.1ubuntu3 | intrepid/universe | i386
libatlas3gf-base | 3.6.0-21.5ubuntu1 | intrepid/universe | amd64

And indeed, the new amd64 version depends on libgfortran3, the old i386 version does not.

Revision history for this message
Tobias Gresch (tobias-gresch) said :
#2

Thanks Albert Damen, that solved my question.

Revision history for this message
Dmitry Petrov (demon-krasno) said :
#3

I just want to add, that the line below solved the issue for me:

dpkg -l | grep atlas | awk {'print $2'} | xargs apt-get remove --purge -y

Revision history for this message
Ron Cadby (diefree) said :
#4

I may have the same problem with my 10.4 Lucid install. I tried the Dmitry 'fix' but it didn't like the permissions, I guess. Not sure how to make it work.

I'm on a Dell Vostro 1000 that operates as 32 bit but has AMD 64 in it. Is that my problem?