1.
确保 电脑上安装了Python3.6,并且 在系统----环境设置---path中 加入你的Python安装路径,我的是安装在C:\Python\
所以在path 中加入双引号中的内容 不包括双引号 " ;C:\Python\Python36;C:\Python\Python36\Scripts"
2.cmd 进入DOS界面输入 pip install tensorflow 回车 。报错:
Exception:
Traceback (most recent call last):
File "c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__ .py, line 73,
in
console_to_str
return
s.decode(sys.__stdout__.encoding)
3.解决: 打开记事本 Python安装目录下C:\Python\Python36\Lib\site-packages\pip\compat\__init__.py
第73行 把return s.decode('utf_8')改成 return s.decode('gbk')
4.cmd 进入DOS界面输入 pip install tensorflow 回车 安装成功