anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

1、去清华镜像https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/下载anaconda

2、开始安装anaconda

注意1、安装路径不要有中文和空格

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

注意2、直接添加系统环境变量,安装完后也得检查下看看环境变量的添加情况

 

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

3、检测安装是否成功以及添加清华镜像

conda --version

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --set show_channel_urls yes

4、使用tensorflow-gpu需要对应的cuda,本人显卡为GTX1650,对应配置为CUDA10.0以及CUDNN7.4,这一块最好参照tensorflow官网GPU支持(https://tensorflow.google.cn/install/gpu)进行配置。

 

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

5、创建tf1.14虚拟环境并检验

conda create -n tf1.14 python=3.7

conda env list 

6、**tf1.14并安装tf1.14和spyder

conda activate tf1.14

pip install tensorflow-gpu==1.14

conda install spyder

7、对github-yolo3(https://github.com/YunYang1994/tensorflow-yolov3/)测试一下,需要安装一下opencv、pillow和easydict。

conda install pillow

opencv直接通过Navigator安装,简单快速省事

easydict安装比较特殊,详见参考链接2

 

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

跑出来的效果还可以

 

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

8、创建tf2.0虚拟环境并检验

conda create -n tf2.0 python=3.7

conda env list 

9、**tf2.0并安装tf2.0和spyder

conda activate tf2.0

pip install tensorflow-gpu==2.0

conda install spyder

10、对手写数字识别进行测试

anaconda下 tensorflow-gpu1.14 tensorflow-gpu2.0的安装

参考链接:

1、https://zhuanlan.zhihu.com/p/75717350?from_voters_page=true

2、https://blog.csdn.net/tangshopping/article/details/95920155