Test failures - which dependencies am I missing?

Hi, When I build NumPy and then run the tests on Ubuntu (10.04 LTS) and Debian (6.1), I always seem to get several failures. I guess most of these failures come from not having some dependencies installed, but I can't figure out which ones by reading e.g. http://docs.scipy.org/doc/numpy/user/install.html. It would be great if someone could tell me what I've likely missed! I remember Gael Varoquaux posted a few weeks back with some of the same errors (http://thread.gmane.org/gmane.comp.python.numeric.general/49032/). He was also using Ubuntu (though a newer version). Anyway, on Ubuntu here are the errors - other than known failures - after "python setup.py build_ext -i" (or python setup.py build_ext -i -- fcompiler=gnu") followed by nosetests: ====================================================================== ERROR: Failure: ImportError (cannot import name fib2) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/f2py_ext/tests/ test_fib2.py", line 3, in <module> from f2py_ext import fib2 ImportError: cannot import name fib2 ====================================================================== ERROR: Failure: ImportError (cannot import name foo) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/f2py_f90_ext/tests/ test_foo.py", line 3, in <module> from f2py_f90_ext import foo ImportError: cannot import name foo ====================================================================== ERROR: Failure: ImportError (cannot import name fib3) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/gen_ext/tests/ test_fib3.py", line 3, in <module> from gen_ext import fib3 ImportError: cannot import name fib3 ====================================================================== ERROR: Failure: ImportError (No module named primes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/pyrex_ext/tests/ test_primes.py", line 3, in <module> from pyrex_ext.primes import primes ImportError: No module named primes ====================================================================== ERROR: Failure: ImportError (cannot import name example) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/swig_ext/tests/ test_example.py", line 3, in <module> from swig_ext import example ImportError: cannot import name example ====================================================================== ERROR: Failure: ImportError (cannot import name example2) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/nose/loader.py", line 379, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.6/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/scratch/ceball/numpy/numpy/distutils/tests/swig_ext/tests/ test_example2.py", line 3, in <module> from swig_ext import example2 ImportError: cannot import name example2 ---------------------------------------------------------------------- I see something similar on Debian 6 (x86_64). You can see the full output for that at https://jenkins.shiningpanda.com/scipy/job/NumPy/ PLATFORM=debian6,PYTHON=CPython-2.7/19/consoleFull, in case it helps. Thanks, Chris

Hi Chris, Try "sudo apt-get build-dep python-numpy" to install the dependencies for building NumPy. I believe it will install all of the optional dependencies as well. HTH, Keith

Keith Hughitt <keith.hughitt <at> gmail.com> writes:
Hi Chris,
Try "sudo apt-get build-dep python-numpy" to install the dependencies for building NumPy. I believe it will install all of the optional dependencies as well.
Thanks for that, but I'd already tried it and found the same failures. However, I also found that on my version of Ubuntu (10.04 LTS), which includes NumPy 1.3.0, running "numpy.test(verbose=3)" yielded the following: nose.config: INFO: Excluding tests matching ['f2py_ext','f2py_f90_ext','gen_ext', 'pyrex_ext', 'swig_ext', 'array_from_pyobj'] I'm not sure where this nose config comes from, but at least someone else knows about some of these failures; presumably they are not important. My next step was going to be searching some mailing lists/contacting the packager... Thanks, Chris

On Tue, May 1, 2012 at 5:20 PM, Chris Ball <ceball@gmail.com> wrote:
Keith Hughitt <keith.hughitt <at> gmail.com> writes:
Hi Chris,
Try "sudo apt-get build-dep python-numpy" to install the dependencies for building NumPy. I believe it will install all of the optional dependencies as well.
Thanks for that, but I'd already tried it and found the same failures.
However, I also found that on my version of Ubuntu (10.04 LTS), which includes NumPy 1.3.0, running "numpy.test(verbose=3)" yielded the following:
nose.config: INFO: Excluding tests matching ['f2py_ext','f2py_f90_ext','gen_ext', 'pyrex_ext', 'swig_ext', 'array_from_pyobj']
Doesn't Debian separate f2py from numpy? Also, long running tests are skipped unless you specify 'full' as the test argument. Also, I don't recall if the f2py tests were actually installed in 1.3, I think that came later around 1.6.
I'm not sure where this nose config comes from, but at least someone else knows about some of these failures; presumably they are not important. My next step was going to be searching some mailing lists/contacting the packager...
Chuck

Chris Ball <ceball <at> gmail.com> writes:
Keith Hughitt <keith.hughitt <at> gmail.com> writes:
Hi Chris,
Try "sudo apt-get build-dep python-numpy" to install the dependencies for building NumPy. I believe it will install all of the optional dependencies as well.
Thanks for that, but I'd already tried it and found the same failures.
However, I also found that on my version of Ubuntu (10.04 LTS), which includes NumPy 1.3.0, running "numpy.test(verbose=3)" yielded the following:
(Above, "numpy" is the Ubuntu-supplied numpy in case that wasn't clear.)
nose.config: INFO: Excluding tests matching ['f2py_ext','f2py_f90_ext','gen_ext', 'pyrex_ext', 'swig_ext', 'array_from_pyobj']
I've discovered that numpy itself explicitly excludes these tests (in numpy/testing/nosetester.py): # Stuff to exclude from tests. These are from numpy.distutils excludes = ['f2py_ext', 'f2py_f90_ext', 'gen_ext', 'pyrex_ext', 'swig_ext'] So, all is explained now. Chris
participants (3)
-
Charles R Harris
-
Chris Ball
-
Keith Hughitt