简体   繁体   English

ImportError SciKit学习

[英]ImportError SciKit-learn

I am trying to get started with machine learning, so I have installed the packages: numpy, Scikit-learn, matplotlib, scipy . 我正在尝试开始机器学习,因此我已经安装了以下软件包: numpy, Scikit-learn, matplotlib, scipy Some I have installed directly from pip with: 我直接从pip安装了一些:

python -m pip install "package name"

and and others i have downloaded the binary files and then installed with pip . 和其他我已经下载了二进制文件,然后使用pip进行安装。 It shows no errors when I import matplotlib, numpy and sklearn , but when I write: 当我导入matplotlib, numpysklearn ,它没有显示任何错误,但是在我编写时:

from sklearn import svm

it gives me the error: 它给了我错误:

ImportError: cannot import name 'svm'  

I am on Python 3.5.1 and on Windows 10. Does anyone have any solutions? 我使用的是Python 3.5.1和Windows10。有人有任何解决方案吗?

It does seem that you didn't install it properly. 似乎您没有正确安装它。 Since you're on windows I would recommend using the Unofficial Windows Binaries for Python Extension Packages website to install future packages. 由于您使用的是Windows,因此建议您使用非官方Windows Python二进制扩展包软件包网站来安装以后的软件包。

Make sure you also install the proper binaries as I pointed out in this post Installing scipy in Python 3.5 on 32-bit Windows 7 Machine . 确保您还按照我在32位Windows 7 Machine上的Python 3.5中安装scipy这篇文章中指出的那样安装正确的二进制文件。 The windows version doesn't matter just make sure you're downloading Visual C++ 2015 redistributable package. Windows版本无关紧要,只需确保您下载的是Visual C ++ 2015可再发行组件包。

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

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