New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing the multiarray numpy extension module failed #9272

Closed
pfmoore opened this Issue Jun 20, 2017 · 39 comments

Comments

Projects
None yet
@pfmoore
Copy link

pfmoore commented Jun 20, 2017

I'm trying to install numpy 1.13.0. My machine is Windows 7, and my Python install is 64-bit Python 3.6.0. I previously had an older version of numpy installed (from Christoph Gohlke's site) but I uninstalled that. I also had a couple of Anaconda installations, but I also uninstalled them. However, when I try to import numpy, I get the above error:

PS 11:46 {00:04.053} D:\experiments                                                                                                                 
>pip install --no-cache numpy                                                                                                                       
Collecting numpy                                                                                                                                    
  Downloading numpy-1.13.0-cp36-none-win_amd64.whl (7.8MB)                                                                                          
    100% |████████████████████████████████| 7.8MB 541kB/s                                                                                           
Installing collected packages: numpy                                                                                                                
Successfully installed numpy-1.13.0                                                                                                                 
PS 11:46 {00:18.096} D:\experiments                                                                                                                 
>python                                                                                                                                             
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32                                                      
Type "help", "copyright", "credits" or "license" for more information.                                                                              
>>> import numpy                                                                                                                                    
Traceback (most recent call last):                                                                                                                  
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\__init__.py", line 16, in <module>                     
    from . import multiarray                                                                                                                        
ImportError: DLL load failed: The specified procedure could not be found.                                                                           
                                                                                                                                                    
During handling of the above exception, another exception occurred:                                                                                 
                                                                                                                                                    
Traceback (most recent call last):                                                                                                                  
  File "<stdin>", line 1, in <module>                                                                                                               
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\__init__.py", line 142, in <module>                         
    from . import add_newdocs                                                                                                                       
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>                       
    from numpy.lib import add_newdoc                                                                                                                
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>                       
    from .type_check import *                                                                                                                       
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>                    
    import numpy.core.numeric as _nx                                                                                                                
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\__init__.py", line 26, 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.                                                                                       

I've checked every other copy of Python on my PC and none of them have numpy installed. I really don't want to uninstall and reinstall my whole Python installation, as there's a lot of packages installed that I'd have to reinstall. None of the other packages, as far as I can tell, are likely to affect numpy (or if they might, they are at the latest version anyway).

What options do I have to work out what's wrong here before I have to clear out every Python install on my machine and do a full reinstall?

@rgommers

This comment has been minimized.

Copy link
Member

rgommers commented Jun 20, 2017

No, shouldn't be affected by other packages. I assume you've checked there's nothing weird in your PATH or PYTHONPATH? And when you say "uninstalled them", did you go into your site-packages and did (a Windows equivalent of )rm -rf numpy? Could be some leftover from the @cgohlke package maybe.

@matthew-brett ping

@pfmoore

This comment has been minimized.

Copy link

pfmoore commented Jun 20, 2017

I did pip install numpy. There's nothing in site-packages with "numpy" in the name after doing so. I wondered about the possibility that it was because I had previously used @cgohlke's builds, but the uninstalls seem to have happened cleanly.

There's nothing obvious that I can see on PATH and I have no PYTHONPATH.

After a bit more playing with ctypes there definitely seems to be something wrong with multiarray:

>>> ctypes.cdll.LoadLibrary(r'C:\users\uk03306\appdata\local\programs\python\python36\lib\site-packages\numpy\core\multiarray.cp36-win_amd64.pyd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 422, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\UK03306\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 344, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
>>> ctypes.cdll.LoadLibrary(r'C:\users\uk03306\appdata\local\programs\python\python36\lib\site-packages\numpy\core\umath.cp36-win_amd64.pyd')
<CDLL 'C:\users\uk03306\appdata\local\programs\python\python36\lib\site-packages\numpy\core\umath.cp36-win_amd64.pyd', handle 7fecc110000 at 0x2789eb8>
>>>
@pfmoore

This comment has been minimized.

Copy link

pfmoore commented Jun 20, 2017

Doing some digging with dependency walker, it looks like some files might be failing to load (things like API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL).

A search of the net shows that these are related to Windows 8 only libraries. I assume these have been linked in accidentally, and numpy isn't desupporting Windows 7?

See dotnet/coreclr#65 and https://answers.microsoft.com/en-us/windows/forum/windows_10-files/missing-api-ms-win-core-dlls/d99d1368-0f92-43db-bbdb-7d080f1f96e9 for a couple of links that I found while researching this issue.

As a short term fix, I've reverted to numpy 1.12.1

@pfmoore

This comment has been minimized.

Copy link

pfmoore commented Jun 20, 2017

I just checked with a colleague. He has the 32-bit build and that seems to work fine. So it may be something specific to the 64-bit binary.

@cgohlke

This comment has been minimized.

Copy link
Contributor

cgohlke commented Jun 20, 2017

This is probably Python issue 29943. Extensions built with Python 3.6.1 won't work on 3.6.0.

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 20, 2017

@cgohlke - good suggestion. From that bug, we should rebuild the numpy wheel with Python 3.6.0. Appveyor defaults to 3.6.1 : https://www.appveyor.com/docs/build-environment/#python

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 20, 2017

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jun 20, 2017

That bug should only affect packages that reference PySlices_GetIndicesEx, though, and can be diagnosed by checking if the resulting binary refers toPySlice_AdjustIndices. I thought numpy wasn't affected.

@pfmoore

This comment has been minimized.

Copy link

pfmoore commented Jun 20, 2017

I've just tested on my home PC, which has Python 3.6.1, and numpy 1.13 works fine there. However, my home PC is also Windows 10, and has a lot of other differences, so it's not a perfect test. I'll upgrade my work PC to 3.6.1 tomorrow, and test there.

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 21, 2017

On my test machine, I installed numpy in a virtualenv for Python.org 3.6.0, got the crash, then installed Python 3.6.1 and didn't get the crash.

@pfmoore

This comment has been minimized.

Copy link

pfmoore commented Jun 21, 2017

I can confirm that upgrading to 3.6.1 fixes my issue on the machine I originally had the problem with. Personally, I'm OK for this issue to be closed with "upgrade to 3.6.1" as the resolution, but I'll leave it to you to close it in case you'd prefer to fix the binary to support 3.6.0.

@charris

This comment has been minimized.

Copy link
Member

charris commented Jun 21, 2017

@matthew-brett I'm going to make a 1.13.1 soon. Are you going to make any modifications to the build?

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 21, 2017

@charris - I guess we should build on 3.6.0. I don't think there's any way to do that with Appveyor and the stock Pythons, so we will need to use Conda.

I was experimenting with building openblas this time, but that may take a little while to finish up - say a week?

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jun 21, 2017

Can someone confirm whether the bad numpy Windows wheels contain a reference to the symbol PySlice_AdjustIndices? If they do then the problem is not restricted to Windows, so we'll need to watch out for that, but at least it's known and will be fixed in the 3.6.2 which is coming out imminently. If not then something else is going on, possibly a previously unknown 3.6.1 abi break that we should report upstream urgently.

Cc @zooba

@cgohlke

This comment has been minimized.

Copy link
Contributor

cgohlke commented Jun 21, 2017

Can someone confirm whether the bad numpy Windows wheels contain a reference to the symbol PySlice_AdjustIndices?

Yes, multiarray.cp36-win_amd64.pyd references PySlice_AdjustIndices and PySlice_Unpack.

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jun 21, 2017

huh, I swear I audited numpy to see if it was affected by bpo-29943, and concluded it wasn't. Yet indeed, it looks like some fellow named "njsmith" added those calls last year: #7215
Sorry for the confusion, not sure what I was thinking there.

@kevinnnluo

This comment has been minimized.

Copy link

kevinnnluo commented Jun 22, 2017

Windows 10, Python 3.6, installed using pip and when I import it, it gives me this error.

C:\Users\Kevin>python
    Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit 
    (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "D:\Python3.6\lib\site-packages\numpy\core\__init__.py", line 16, in 
<module>
from . import multiarray
ImportError: DLL load failed: The specified procedure could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python3.6\lib\site-packages\numpy\__init__.py", line 142, in 
<module>
    from . import add_newdocs
  File "D:\Python3.6\lib\site-packages\numpy\add_newdocs.py", line 13, in 
<module>
    from numpy.lib import add_newdoc
  File "D:\Python3.6\lib\site-packages\numpy\lib\__init__.py", line 8, in 
<module>
    from .type_check import *
  File "D:\Python3.6\lib\site-packages\numpy\lib\type_check.py", line 11, in 
<module>
    import numpy.core.numeric as _nx
  File "D:\Python3.6\lib\site-packages\numpy\core\__init__.py", line 26, 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.

Original error was: DLL load failed: The specified procedure could not be 
found.
@charris

This comment has been minimized.

Copy link
Member

charris commented Jun 26, 2017

@matthew-brett Any news on this front? I'd like to get 1.13.1 out this week if possible.

@njsmith Python 3.6.2 is due out this Friday. Does it fix the problem and is it still on schedule?

EDIT: If we do build with Python 3.6.0 or 3.6.2, will the wheels still work with 3.6.1?

@charris charris added this to the 1.13.1 release milestone Jun 26, 2017

@charris charris added the 00 - Bug label Jun 26, 2017

@charris

This comment has been minimized.

Copy link
Member

charris commented Jun 26, 2017

Looks like we dodged that bullet with 1.12.1, but just by a couple of days...

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jun 26, 2017

Yes, building with 3.6.0 or 3.6.2 should be safe, in the sense that the resulting binaries will work on all 3.6.x systems.

If we have to, it's also possible to use a preprocessor hack to work around the problem on 3.6.1. I think the appropriate incantation is this one: https://github.com/pandas-dev/pandas/blob/24719672685027710cf432023a7fbc3222b0b05c/pandas/_libs/src/compat_helper.h#L29-L33

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 26, 2017

Just working on mingw OpenBLAS compiles, with @carlkl . Some progress, but can't promise to get it done in the next few days. Use preprocessor hack for now?

@charris

This comment has been minimized.

Copy link
Member

charris commented Jun 26, 2017

@matthew-brett If 3.6.2 comes out on Friday and is available on appveyor soon after, I'd just as soon go that way. Out of curiosity, what does numpy on window use currently?

@matthew-brett

This comment has been minimized.

Copy link
Contributor

matthew-brett commented Jun 26, 2017

We're using ATLAS at the moment, but performance is pretty bad. It would be good to be able to use OpenBLAS, for performance and for consistency with the Linux builds.

I'm not sure how long Appveyor will take before upgrading Python 3.6 to 3.6.2.

@tobigithub

This comment has been minimized.

Copy link

tobigithub commented Jul 23, 2017

Same issue, numpy v1.13.1 and and python 3.6.1 worked for couple of months, now it just fails. This was based on a conda installation using the windows anaconda navigator. May and June 2017 all code runs fine, then July with an update and and python 3.6.2 "import numpy" does not work anymore.

Some further investigation (only based on numpy and python 3.6.2 leads to
C:\Anaconda3\envs\tensorflow-cpu\Lib\site-packages\numpy\core\multiarray.cp36-win_amd64.pyd
(compiled python DLL) from 7/7/2017 which loads
C:\Windows\System32\mkl_intel_thread.dll (v2009)
C:\Windows\System32\mkl_core.dll (v2009)
C:\Windows\System32\libiomp5md.dll (v2009)

now the problem is, that there are multiple versions for each of the DLLs (DLL hell)
all different dates, versions, file sizes. Basically the Anaconda Navigator or Spyder or python installed through different environments do not load the correct DLL versions.


mkl_intel_thread.dll
C:\Anaconda3\Library\bin\mkl_intel_thread.dll (october 2016)
C:\Anaconda3\pkgs\mkl-2017.0.3-0\Library\bin\mkl_intel_thread.dll (april 2017)
C:\Windows\System32\mkl_intel_thread.dll (v2009)


mkl_core.dll
C:\Anaconda3\pkgs\mkl-2017.0.3-0\Library\bin\mkl_core.dll (april 2017)
C:\Anaconda3\Library\bin\mkl_core.dll (october 2016)
C:\Windows\System32\mkl_core.dll (v2009)


libiomp5md.dll
C:\Anaconda3\pkgs\mkl-2017.0.3-0\Library\bin\libiomp5md.dll
C:\Anaconda3\Library\bin\libiomp5md.dll
C:\Anaconda3\envs\tensorflow-cpu\Library\bin\libiomp5md.dll
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler\libiomp5md.dll
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler\libiomp5md.dll
C:\Windows\System32\libiomp5md.dll

each of them different versions, file sizes and versions. Basically the libraries that are loaded refer
to very old versions ranging from 2009 to 2017. This is an issue with numpy loading old versions from the C:\Windows\System32\ folder.

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jul 23, 2017

@tobigithub: if you're having trouble loading MKL libraries, then you should take that to the anaconda developers – the numpy project doesn't distribute any binaries that use MKL, and conda has its own ways of trying to avoid DLL hell that we can't really help you with.

@carlkl

This comment has been minimized.

Copy link
Contributor

carlkl commented Jul 23, 2017

@tobigithub, this seems to be a copy of #6923. You may try out if #6923 (comment) or #6923 (comment) works for you.

Another solution is to find and deinstall the software which copied old MKL DLLs into the windows systems folders. You should consider to deinstall the MKL redistributable files as well.

@tobigithub

This comment has been minimized.

Copy link

tobigithub commented Jul 24, 2017

@njsmith and @carlkl
thank you. There are literally hundreds of applications that use these intel libraries (including Microsoft and Intel itself). With thousands of applications installed sure something will break, but updating older system DLLS (2009) if they predate an new issue will probably create a disaster. It might be system critical such as an INTEL RAID driver or USB or graphics adapter will fail. Just reporting this issue here, its just a hunch, numpy 1.13.1 just worked fine before and now in July 2017 it is magically broken, this may be related to software installs, windows updates or any other packages or events, the error message itself probably also does not help.

Similar issues with numpy and DLLs:
https://www.google.com/search?q=numpy+"Importing+the+multiarray+numpy+extension+module+failed."&oq=numpy+"Importing+the+multiarray+numpy+extension+module+failed."

@njsmith

This comment has been minimized.

Copy link
Member

njsmith commented Jul 24, 2017

@tobigithub: I'm sorry you're having problems, but again, if the problem is caused by the interaction of numpy and MKL, then there is nothing the numpy project can do about it; we provide source code that anyone can use to build numpy linked against any linear algebra library they like, and we provide binaries linked to openblas, but we don't link numpy against MKL ourselves or have any control over how the conda developers set that up.

That google search just finds every case that anyone had any kind of problem with numpy binaries – for example, this bug report that you're commenting on was filed to report an incompatibility between the numpy binaries you get with pip install numpy and python 3.6.0, and has nothing to do with MKL. As far as I know you're the only person who's reported problems caused by old versions of MKL in C:\Windows\System32. And it makes sense that this would cause problems, because the Windows DLL loading rules are set up on the assumption that C:\Windows\System32 only contains important operating-system DLLs that should never be replaced by users and should override everything else... putting MKL in there is really bad.

If your RAID or USB driver or whatever is broken in such a way that it breaks other software on your system, then I guess you should file a bug with them? I'm sympathetic to your frustration, but there's literally nothing we can do here to help you, beyond making suggestions to identify the software that's actually at fault. It's not numpy.

@tobigithub

This comment has been minimized.

Copy link

tobigithub commented Jul 24, 2017

@njsmith
thank you, I just confirmed using a VM on a clean Windows 10 system that has never seen Intel MKL DLLs, numpy or conda, all things are fine and numpy works. I am just puzzled how numpy suddenly stopped working, could be third parties. Probably needs some more digging, lets see what we can find out to make numpy ironclad to any dependency issue.

...ok here the solution

The solution is indeed related to some DLL depencency issues under WIN with Intel MKL libraries
the numpy import error was under python 3.6.2 and numpy 1.13.1 :

"import numpy"
numpy\core_init_.py", line 16, in
from . import multiarray
ImportError: DLL load failed: The specified procedure could not be found.

The quick and dirty solution is to copy all Intel mkl*.dll libraries from the specific environments (env) subfolder (seen at stackoverflow)

<\Library\bin> to
<\Lib\site-packages\numpy\core>

04/13/2017  12:50 AM        30,277,392 mkl_avx.dll
04/13/2017  12:50 AM        38,253,840 mkl_avx2.dll
04/13/2017  12:50 AM        42,234,640 mkl_avx512.dll
04/13/2017  12:50 AM        45,722,896 mkl_avx512_mic.dll
04/13/2017  12:50 AM        25,369,360 mkl_core.dll
04/13/2017  12:50 AM        24,541,456 mkl_def.dll
04/13/2017  12:50 AM        24,506,640 mkl_intel_thread.dll
04/13/2017  12:50 AM        29,744,400 mkl_mc.dll
04/13/2017  12:50 AM        30,594,320 mkl_mc3.dll
04/13/2017  12:50 AM        12,567,824 mkl_rt.dll
04/13/2017  12:50 AM        11,388,688 mkl_sequential.dll
04/13/2017  12:50 AM        12,575,504 mkl_tbb_thread.dll
04/13/2017  12:50 AM        11,250,960 mkl_vml_avx.dll
04/13/2017  12:50 AM        11,463,952 mkl_vml_avx2.dll
04/13/2017  12:50 AM        10,285,840 mkl_vml_avx512.dll
04/13/2017  12:50 AM        11,692,304 mkl_vml_avx512_mic.dll
04/13/2017  12:50 AM         5,224,208 mkl_vml_cmpt.dll
04/13/2017  12:50 AM         5,345,552 mkl_vml_def.dll
04/13/2017  12:50 AM         9,477,904 mkl_vml_mc.dll
04/13/2017  12:50 AM         9,368,336 mkl_vml_mc2.dll
04/13/2017  12:50 AM         9,593,616 mkl_vml_mc3.dll

now numpy can be imported and runs fine.

@tobigithub

This comment has been minimized.

Copy link

tobigithub commented Jul 24, 2017

Its a numpy/conda/python issue under windows. Both examples are executed at the same time using the same Anaconda Navigator (conda) version. Installing different python versions and then testing all different dependencies and version numbers can help find the issue. After that code changes have to be investigated.

Working
Python 3.5.3 and numpy 1.10.1 and mkl 2017.0.3

Python 3.5.3 |Continuum Analytics, Inc.| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print (sys.version)
3.5.3 |Continuum Analytics, Inc.| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)]
>>>
>>> import numpy
>>> numpy.version.version
'1.10.1'
>>>
>>> import numpy as np
>>> a = np.array([1, 2, 3, 4, 5])
>>> print(a)
[1 2 3 4 5]
>>>

Broken
Python 3.5.3 and numpy 1.13.1 and mkl 2017.0.3

Python 3.5.3 |Continuum Analytics, Inc.| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print (sys.version)
3.5.3 |Continuum Analytics, Inc.| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)]
>>>
>>> import numpy
Traceback (most recent call last):
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
    from . import multiarray
ImportError: DLL load failed: The specified procedure could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import add_newdocs
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
    from .type_check import *
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "C:\Anaconda3\envs\python35-numpy-test\lib\site-packages\numpy\core\__init__.py", line 26, 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.

Original error was: DLL load failed: The specified procedure could not be found.
@pv

This comment has been minimized.

Copy link
Member

pv commented Jul 24, 2017

@carlkl

This comment has been minimized.

@charris

This comment has been minimized.

Copy link
Member

charris commented Sep 18, 2017

Appveyor issue for Python 3.6.2 is at appveyor/ci#1770

@charris

This comment has been minimized.

Copy link
Member

charris commented Sep 24, 2017

The Python 3.6 wheels builders look to be updated to Python 3.6.2, so closing this.

@AllenYLJiang

This comment has been minimized.

Copy link

AllenYLJiang commented Mar 7, 2018

Compatibility. Python Interpreter's version and numpy's version.
pip3 installs numpy of version 3.5, thus you should use anaconda to set up a python env of corresponding version

@praveentn

This comment has been minimized.

Copy link

praveentn commented Apr 23, 2018

Was having the same issue with Python 3.6.2 and Numpy/Scipy on Windows 8. Anaconda is not installed as well.

Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32

C:\Python36\Scripts>pip freeze

numpy==1.14.2
pandas==0.21.0
scipy==1.0.1

Python 2.7 was present in the PATH variable. Removed it.

Then uninstalled existing scipy and numpy modules. Ensure that the commands are executed as Administrator.

pip uninstall numpy
pip uninstall scipy

Then ran

pip install numpy --upgrade
pip install scipy --upgrade

This resolved the issue!

Thanks,
Praveen

@KumarNavneet

This comment has been minimized.

Copy link

KumarNavneet commented Apr 28, 2018

Hi,
I am still getting this error.
Python version: 3.6.4
numpy version: 1.14.3
Stack trace is as below:
Traceback (most recent call last):
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy\core_init_.py", line 16, in
from . import multiarray
ImportError: DLL load failed: The network path was not found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "pca_svm.py", line 1, in
import numpy as np
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy_init_.py", line 142, in
from . import add_newdocs
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy\add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy\lib_init_.py", line 8, in
from .type_check import *
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy\lib\type_check.py", line 11, in
import numpy.core.numeric as nx
File "D:\Personal\Softwares\InstallationDir\Python\lib\site-packages\numpy\core_init.py", line 26, in
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.

Original error was: DLL load failed: The network path was not found.

any help is appreciated.
Thanks,

@rgommers

This comment has been minimized.

Copy link
Member

rgommers commented Apr 29, 2018

@KumarNavneet that's a different problem than what this issue is about. The exception message tells you that you have a broken install and should reinstall numpy. If that doesn't work, please open a new issue and tell us exactly how you installed numpy.

@rgommers

This comment has been minimized.

Copy link
Member

rgommers commented Apr 29, 2018

This issue about the 3.6.1 binaries not working with 3.6.0 has definitely been resolved, and people continue to post here other install issues because the importerror looks similar. Hence I'm locking this issue.

@numpy numpy locked as resolved and limited conversation to collaborators Apr 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.