安装scikit-learn

首先到官网下载安装 python ,之后下载setuptools 进行安装。

 

'python' 不是内部或外部命令 

可运行 set PATH=%PATH%;C:\Python34

安装完成之后,运行easy_install virtualenv

 

之后根据

Scikit-learn requires:

  • Python (>= 2.6 or >= 3.3),
  • NumPy (>= 1.6.1),
  • SciPy (>= 0.9).

安装 easy_install numpy

安装 easy_install SciPy 

完成之后即可运行 easy_install scikit-learn 

C:\Python34\Scripts>easy_install scikit-learn
Searching for scikit-learn
Reading https://pypi.python.org/simple/scikit-learn/
Reading http://scikit-learn.org
Reading http://scikit-learn.sourceforge.net
Download error on http://scikit-learn.sourceforge.net: timed out -- Some package
s may not be found!
Reading http://sourceforge.net/projects/scikit-learn/files/
Best match: scikit-learn 0.16.1
Downloading https://pypi.python.org/packages/3.4/s/scikit-learn/scikit-learn-0.1
6.1.win32-py3.4.exe#md5=28dc57e538e074748832d18fb8a93e88
Processing scikit-learn-0.16.1.win32-py3.4.exe
creating 'C:\Users\ADMINI~1\AppData\Local\Temp\easy_install-qg8zl565\scikit_lear
n-0.16.1-py3.4-win32.egg' and adding 'C:\Users\ADMINI~1\AppData\Local\Temp\easy_
install-qg8zl565\scikit_learn-0.16.1-py3.4-win32.egg.tmp' to it
creating c:\python34\lib\site-packages\scikit_learn-0.16.1-py3.4-win32.egg
Extracting scikit_learn-0.16.1-py3.4-win32.egg to c:\python34\lib\site-packages
Adding scikit-learn 0.16.1 to easy-install.pth file

Installed c:\python34\lib\site-packages\scikit_learn-0.16.1-py3.4-win32.egg
Processing dependencies for scikit-learn
Finished processing dependencies for scikit-learn

  如按照此方式操作依然不行

>>> import sklearn
Traceback (most recent call last):
  File "<pyshell#15>", line 1, in <module>
    import sklearn
ImportError: No module named 'sklearn'

可在 https://github.com/scikit-learn/scikit-learn 下载

解压到 C盘目录下 运行 python setup.py install 即可。

 

转载于:https://www.cnblogs.com/CoreXin/p/4818368.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值