Windows Python Install: requires numpy+mkl & ImportError: cannot import name NUMPY_MKL


Recently, I wrote an article about “installation and use of Microsoft open source distributed high performance GB framework lightgbm”. Some partners encountered problems when installing Python environment. I personally tried to install it, and I really encountered a lot of problems“ After the problem of “installing the SciPy Library of Python under Windows 7” was solved, we encountered “importerror: cannot import name numpy”_ MKL. As follows:


view plain


D:\LightGBM\LightGBM\examples\python-guide> pythonsimple_


File”simple_”,line4,in< module>


File”D:\Python27\lib\site-packages\lightgbm-0.1-py2.7.egg\lightgbm\__ init__. p

y”,line9,in< module>



line15,in< module>


File”D:\Python27\lib\site-packages\scipy\__ init__. py”,line61,in< module>

fromnumpy._ distributor_ initimportNUMPY_ MKL#requiresnumpy+mkl

ImportE rror:cannotimportnameNUMPY_ MKL

Why is there such a problem

Reference“ ”What I’m saying is

Because my “SciPy” is installed with “. WHL” file according to the method in “installation of Python’s SciPy Library under Windows 7”, and “numpy” is installed with “PIP install numpy” command

In fact, I used the “PIP install numpy” command to install. In fact, I downloaded a “. WHL” file, which is different from the download source of “SciPy”, but it doesn’t work

What to do?What to do

Unload numpy with the command “PIP install numpy” and MKL with the command “PIP install MKL”

Using the same source as “SciPy”, from“ ”Download the installation file of “numpy” (find the corresponding version)

Then use the command to install: PIP installnumpy {1.14.2 + MKL} cp35} cp35m} win_ AMD64. WHL

The problem is solved

Similar Posts: