【Deepin 20系统】Linux系统安装Anaconda和Tensorflow-gpu2.3

淡淡的烟草味﹌ 2022-12-28 09:08 355阅读 0赞

1 安装Anaconda

1.1 下载安装

进入官网Anaconda官网
选择64位的版本下载,可以复制链接到迅雷下载,下载快一些。
或者清华大学tensorflow镜像

bash Anaconda3-2020.11-Linux-x86_64

执行以下步骤
(1)是否确定安装,输入yes
(2)出现more, 按空格继续
(3)Do you accept the license terms? 输入yes
(4)Anaconda3 will now be installed into this location: /home/mgege007/anaconda3确定安装位置,按enter继续
(5)Do you wish the installer to initialize Anaconda3 by running conda init? 输入Yes,然后就安装好了。

1.2 配置环境变量

sudo vim /etc/profile

在文件的最后加上,这里注意,这里的路径对应第(4)步中你安装的时候选择的路径,我这里是/hom/mgge007/anaconda3

  1. #Anaconda
  2. export PATH=$PATH:/home/mgege007/anaconda3/bin

在这里插入图片描述

1.3 测试

测试是否安装好,输入conda,显示如下

conda
在这里插入图片描述

2 安装Tensorflow 2.3 GPU版本

前提是安装了anaconda,因为anaconda是自带最新的python和pip的。所以以下步骤是基于上面的ananconda安装成功后,能使用的。

pip install tensorflow-gpu==2.3 -i https://pypi.douban.com/simple/

等待显示如下表示安装完毕
在这里插入图片描述

查看tensorflow版本

python3
import tensorflow as tf
print(tf.version)

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,355人围观)

还没有评论,来说两句吧...

相关阅读