先添加pip的环境变量(也在Scripts下面),再用pip安装numpy——在cmd输入如下路径,pip安装numpy:
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\numpy-1.13.3-2-cp36-none-win32.whl
C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts;
C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files (x86)\Lenovo\FusionEngine;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
C:\Program Files (x86)\Lenovo\Lenovo Home\;
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
20171204用pip安装scipyhe/matplotlib/sklearn,方法和pip安装numpy相同。
进入 www.lfd.uci.edu/%7Egohlke/pythonlibs/ 这个python库下载界面
找到numpy+mkl和scipy下载相应版本
下载完毕后,进入有whl文件的界面,在ftp地址栏输入cmd
再输入 pip3 install +whl文件的全名,安装whl。
先安装numpy,再安装scipy
scipy下载路径:https://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
【安装scipy前,提示先安装Numpy; Numpy和我之前安装的名称不同,下载路径:https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy】
Scikit-learn下载路径:https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
以下参考文档:
https://www.cnblogs.com/rucwxb/p/7297733.html
在命令界面cmd,查看系统版本的方法:
>>> import pip
>>> print(pip.pep425tags.get_supported())
[('cp36', 'cp36m', 'win32'), ('cp36', 'none', 'win32'), ('py3', 'none', 'win32')
, ('cp36', 'none', 'any'), ('cp3', 'none', 'any'), ('py36', 'none', 'any'), ('py
3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', '
none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none'
, 'any')]
>>>
【我没有安装wheel。】
1.1,重新安装numpy【尽管电脑中已经安装过numpy-1.13.3-2-cp36-none-win32,但仍旧要重新下载(主要是mkl)】
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\numpy-1.13.3+mkl-cp36-cp36m-win32.whl
1.2,验证:输入随机矩阵;
from numpy import *
random.rand(3,3)
2.1,安装scipy
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\scipy-1.0.0-cp36-cp36m-win32.whl
2.2,再次进入python,引用,不报错证明OK。
import scipy
以上也可以,在tfp地址栏输入cmd的方式。【https://www.cnblogs.com/rucwxb/p/7297733.html】
3,安装SKlearn
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\scikit_learn-0.19.1-cp36-cp36m-win32.whl
4,安装graphviz 需要添加path。
C:\Program Files (x86)\Graphviz2.38\bin;
C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts;
C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files (x86)\Lenovo\FusionEngine;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Lenovo\Lenovo Home\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
dot -Tpdf D:\PycharmProjects2017\DRtee-1\allElectronicInformationGainOri.dot -o outpu.pdf----可以,但是pdf打不开
D:\PycharmProjects2017\DRtee-1>dot _Tpdf allElectronicInformationGainOri.dot -o allElectronicInformationGainOri.pdf
D:\PycharmProjects2017\DRtee-1\dot -Tpdf allElectronicInformationGainOri.dot -o output.pdf---Wrong
D:\PycharmProjects2017\DRtee-1>dot -Tpdf allElectronicInformationGainOri.dot -o outpu.pdf
dot -Tpdf allElectronicInformationGainOri.dot -o outpu.pdf【终于OK!!!】——转换后的文件名字是output.pdf
5,20171210-学习SVM,画图,安装matplotlib
https://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\matplotlib-2.1.1-cp36-cp36m-win32.whl
6,20171210-学习SVM,人脸识别,安装pillow;
https://github.com/python-pillow/Pillow
pip3.6 install C:\Users\lenovo\AppData\Local\Programs\Python\Python36-32\Scripts\Pillow-4.3.0-cp36-cp36m-win32.whl