question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing the multiarray numpy extension module failed

See original GitHub issue

I’m trying to install numpy 1.12.0 from source using Intel 17.0.1 MKL and Python 2.7.13, following the instructions at: https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl

The build succeeds, but when I try to import numpy, I’m seeing:

$ python
Python 2.7.13 (default, Feb 21 2017, 08:45:20) 
[GCC Intel(R) C++ gcc 4.4.7 mode] 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 "/blues/gpfs/home/software/spack-0.10.0/opt/spack/linux-centos6-x86_64/intel-17.0.1/py-numpy-1.12.0-r7qapsmckwr6jjvb6llkoufk36g5t36h/lib/python2.7/site-packages/numpy-1.12.0-py2.7-linux-x86_64.egg/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/blues/gpfs/home/software/spack-0.10.0/opt/spack/linux-centos6-x86_64/intel-17.0.1/py-numpy-1.12.0-r7qapsmckwr6jjvb6llkoufk36g5t36h/lib/python2.7/site-packages/numpy-1.12.0-py2.7-linux-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/blues/gpfs/home/software/spack-0.10.0/opt/spack/linux-centos6-x86_64/intel-17.0.1/py-numpy-1.12.0-r7qapsmckwr6jjvb6llkoufk36g5t36h/lib/python2.7/site-packages/numpy-1.12.0-py2.7-linux-x86_64.egg/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/blues/gpfs/home/software/spack-0.10.0/opt/spack/linux-centos6-x86_64/intel-17.0.1/py-numpy-1.12.0-r7qapsmckwr6jjvb6llkoufk36g5t36h/lib/python2.7/site-packages/numpy-1.12.0-py2.7-linux-x86_64.egg/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/blues/gpfs/home/software/spack-0.10.0/opt/spack/linux-centos6-x86_64/intel-17.0.1/py-numpy-1.12.0-r7qapsmckwr6jjvb6llkoufk36g5t36h/lib/python2.7/site-packages/numpy-1.12.0-py2.7-linux-x86_64.egg/numpy/core/__init__.py", line 24, in <module>
    raise ImportError(msg)
ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Any suggestions as to how to debug this problem?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:38 (24 by maintainers)

github_iconTop GitHub Comments

4reactions
Woupscommented, Dec 9, 2018

I had the same error and I just reinstall numpy and it works now

pip install --upgrade --force-reinstall numpy

3reactions
smogharehabedcommented, Aug 21, 2017

I had the same problem. Try install numpy through anaconda prompt “conda install numpy”. My problem was solved after 3 hours of google search (UGH!).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing the multiarray numpy extension module failed #10714
I just finished installing Anaconda for Python 3.7 on Windows and had received this numpy error too! I had to run "pip install...
Read more >
Installing numpy for Windows 10: Importing the multiarray ...
Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try `git clean...
Read more >
Numpy import error in PyCharm (Importing the multiarray ...
ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy.
Read more >
ImportError: Importing the multiarray numpy extension module ...
ImportError : Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy.
Read more >
Import Numpy Package error - Visual Studio Feedback
raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found