Windows安装TensorFlow
在线安装nightly包
pip install tf-nightly
若要安装最新的GPU版本可以使用如下命令:
pip install tf-nightly-gpu
或者直接安装,一般按照此方法就库解决
```python
pip install tf-nightly -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
原因
url的来源的问题,换成了国内的pip源就可以正常安装了
国内镜像:
http://mirrors.aliyun.com/pypi/simple/ 阿里云
https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
http://pypi.douban.com/simple/ 豆瓣
https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
安装纯净的TensorFlow
pip install tensorflow
上面是CPU版本,GPU版本的安装命令如下:
pip install tensorflow-gpu
更新安装TensorFlow
pip uninstall <安装时的TensorFlow 名称>
关于如何安装TensorFlow,请毫不犹豫地选择:离线安装
在此网站找到TensorFlow,下载对应的python版本,然后切换到想要安装的目录执行:
pip install tensorflow-1.9.0-cpxx-cpxxm-win_amd64.whl
在这里插入代码片
这里基本上都能安装成功了,可是,如果报错:
解决方法:
重新安装一遍:
pip --default-timeout=100 install -U Pillow