1

I have two unit test errors in numpy which i can't seem to decipher: I'm running Ubuntu 16.4

> Running unit tests for numpy
NumPy version 1.11.0
NumPy relaxed strides checking option: False
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy
Python version 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
nose version 1.3.

and then the errors are:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in        loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python2.7/dist-packages/numpy/core/tests/test_indexing.py", line 17, in <module>
cdll = np.ctypeslib.load_library('multiarray', np.core.multiarray.__file__)
File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 163, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension

======================================================================

ERROR: Failure: OSError (no file with expected extension)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python2.7/dist-packages/numpy/tests/test_ctypeslib.py", line 11, in <module>
cdll = load_library('multiarray', np.core.multiarray.__file__)
File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 163, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension

Does anyone have an idea what might be the problem?

2
  • Source code for some hints of what it is trying to do: github.com/numpy/numpy/blob/…, just search for your error. Commented Jan 29, 2017 at 17:45
  • Looks like it's got to do with how Ubuntu installs numpy - there is a multiarray so file but it's named slightly different from the filenames that are tried Commented Jan 29, 2017 at 21:54

1 Answer 1

1

I had exactly the same error happening for numpy 1.11.0 and Ubuntu 16.04. I upgraded numpy to the most recent one [sudo] pip install --upgrade numpy, and then the tests worked.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.