一、直接安装
命令:pip install tensorflow==1.15.2
二、换 阿里云 镜像源
命令:pip install -i http://mirrors.aliyun.com/pypi/simple tensorflow==1.15.2
三、换 豆瓣 镜像源
命令:pip install http://pypi.douban.com/simple tensorflow==1.15.2
错误:
ERROR: Cannot unpack file C:\Users\Administrator\AppData\Local\Temp\pip-unpack-4y1t7wu2\simple (downloaded from C:\Users\Administrator\AppData\Local\Temp\pip-req-build-ks2gek_b, content-type: text/html; charset=utf-8); cannot detect archive forma
tERROR: Cannot determine archive format of C:\Users\Administrator\AppData\Local\Temp\pip-req-build-ks2gek_b
四、换 中国科学技术大学 镜像源
命令:pip install http://pypi.mirrors.ustc.edu.cn/simple/ tensorflow==1.15.2
ERROR: Cannot unpack file C:\Users\Administrator\AppData\Local\Temp\pip-unpack-s6qfhuow\simple.htm (downloaded from C:\Users\Administrator\AppData\Local\Temp\pip-req-build-o8_q5nl6, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\Administrator\AppData\Local\Temp\pip-req-build-o8_q5nl6
解决:使用如下命令即可解决
pip install tensorflow==1.15.2 -i https://pypi.douban.com/simple --trust -host=pypi.douban.com
成功解决: