一、设置国内源
在更新包的时候,默认源速度较慢,可以使用国内源
conda config --add channels mirrors.tuna.tsinghua.edu.cn/anaconda/pk…
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 conda.anaconda.org/anaconda tensorflow-gpu=1.12.0 #在linux上面亲测通过
conda install --channel conda.anaconda.org/anaconda keras=2.2.4 #在linux上面亲测通过
参考: