Tensorflow的安装真是一言难尽,运气好的可能安装一次就成功,还有的就是花式报错了。
这里总结了某安装多次走过的坑,祝大家好运
以下是Windows10,python3.7x安装tensorflow的一些小建议
首先确定自己已经装好了annaconda
确定自己的python版本
然后按照这位大神写的https://blog.csdn.net/weixin_42555080/article/details/100704078
命令真的很全面,照着做,直到activate tensorflow这一步
输入命令:
pip install --user tensorflow==1.13.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
(这个命令保证是速度快可用的)
要是报错,主要是
1.socket.timeout: The read operation timed out
此时原因大概可能是网不好,或者需要设置超时时间
pip --default-timeout=100 install --user tensorflow
或者是因为下载太慢导致访问超时,
换个镜像下载
镜像网址
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hus