一、设置国内源
在更新包的时候,默认源速度较慢,可以使用国内源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
二、安装指定版本的TensorFlow或者Keras
1. 首先在Anaconda的库中查找所有的相关的repository。
anaconda search -t conda tensorflow
anaconda search -t conda keras
2. 根据自己的环境选择安装对应的版本,查看repository中的信息,anaconda会返回供安装的版本号以及安装方法。
anaconda show anaconda/tensorflow
anaconda show anaconda/keras
3.根据返回的内容进行安装
conda install --channel https://conda.anaconda.org/anaconda tensorflow-gpu=1.12.0 #在linux上面亲测通过
conda install --channel https://conda.anaconda.org/anaconda keras=2.2.4 #在linux上面亲测通过
参考:
https://conda.anaconda.org/anaconda
https://www.cnblogs.com/wxshi/p/6805120.html
https://blog.csdn.net/weixin_43937316/article/details/90267975
https://blog.csdn.net/gao158190523/article/details/82493987