简体   繁体   中英

Install scikit-learn, numpy import error

I am trying to test scikit-learn library, but didn't manage to install it.

More details : I did install numpy, scipy, matplotlib and I can use them just fine. However, when I use pip ( pip install -U scikit-learn ), I get this error :

Partial import of sklearn during the build process.
Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\...\scikit-learn\setup.py", setup_package()
    File "C:\Users\...\scikit-learn\setup.py", from numpy.distutils.core import setup
ImportError: No module named 'numpy'

I couldn't find anything about this.

I tried installing scikit-learn directly by using python setup.py and had the same problem. Any ideas?

Thanks you.

I think there are something wrong with the installation of numpy. Try download and reinstall following package (for Python 2.7):

http://downloads.sourceforge.net/project/numpy/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python2.7.exe?r=&ts=1442420256&use_mirror=netix

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM