简体   繁体   English

安装scikit-learn,numpy导入错误

[英]Install scikit-learn, numpy import error

I am trying to test scikit-learn library, but didn't manage to install it. 我正在尝试测试scikit-learn库,但没有设法安装它。

More details : I did install numpy, scipy, matplotlib and I can use them just fine. 更多详细信息:我确实安装了numpy,scipy,matplotlib,并且可以正常使用它们。 However, when I use pip ( pip install -U scikit-learn ), I get this error : 但是,当我使用pippip install -U scikit-learn )时,出现此错误:

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. 我尝试通过使用python setup.py直接安装scikit-learn并遇到相同的问题。 Any ideas? 有任何想法吗?

Thanks you. 谢谢。

I think there are something wrong with the installation of numpy. 我认为numpy的安装有问题。 Try download and reinstall following package (for Python 2.7): 尝试下载并重新安装以下软件包(适用于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 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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