首先到官网下载安装 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 即可。