Red Hat Bugzilla – Bug 513691
numpy gives AttributeError on import, requires lapack and atlas as dependencies
Last modified: 2010-06-28 09:48:40 EDT
Description of problem:
On a freshly installed 32bit F11 installation, an "import numpy" in python gives an "AttributeError: 'module' object has no attribute 'core'". Bug https://bugzilla.redhat.com/show_bug.cgi?id=496218 suggests to install numpy-f2py, but that did not help.
I had to install the "lapack" and "atlas" packages to get it to work.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. clean install of Fedora 11 (no lapack and atlas packages installed)
2. install numpy ("yum install numpy")
3. do "import numpy" in python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/numpy/__init__.py", line 130, in <module>
File "/usr/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
from lib import add_newdoc
File "/usr/lib/python2.6/site-packages/numpy/lib/__init__.py", line 13, in <module>
from polynomial import *
File "/usr/lib/python2.6/site-packages/numpy/lib/polynomial.py", line 11, in <module>
import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'
no output (= successfull import)
As I said, the error disappears after installing atlas and lapack. I suggest adding these packages to the dependencies of numpy.
Hmm...this is a bit odd...as numpy already has a requirement in place that pulls in atlas.
Do me a favor can you give us the output of:
rpm -q --requires numpy |grep libatlas
you should see libatlas.so.3 the only packages which provide that are atlas packages.
rpm -q --whatprovides libatlas.so.3
The numpy package was already requiring that something provide libatlas.so.3. If that requirement wasn't satified at install time, that points to a bug in the install process.
Now that I have those packages installed:
$ rpm -q --requires numpy |grep libatlas
$ rpm -q --whatprovides libatlas.so.3
I agree that it is weird that it wasn't installed. I'm pretty sure I had no problems or unfinished transactions installing anything so far. It seems to work now, however (if I do "yum remove atlas-sse atlas-sse3" numpy is removed as well. Re-installing numpy or pygame pulls "atlas-sse" as a requirement).
Now that I come to think of it ... I don't actually recall installing numpy with yum, I probabably installed it with anacaonda, because I can't seem to reproduce the problem with yum. I did install pygame with yum, and that gave no problems, though I do not remember if it pulled in numpy or if it was installed already.
Is there an easy way to test an anaconda installation, or is that substantially the same as installing something with yum?
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.