Ubuntu20.04 安装Anaconda3 TensorFlow

下载Anaconda3

https://repo.anaconda.com/archive/

wget -P tmp https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh

安装

chmod +x Anaconda3-5.3.1-Linux-x86_64.sh
./Anaconda3-5.3.1-Linux-x86_64.sh

期间交互一路‘yes’

验证

在这里插入图片描述

配置环境变量

vi ~/.bashrc
export PATH="/home/ubuntu/anaconda3/bin:$PATH" #添加
. ~/.bashrc

使用jupyter notebook

jupyter notebook

安装TensorFlow

conda create -n tf#创建虚拟环境
source activate tf#激活虚拟环境
conda install  tensorflow#安装CPU版本
source deactivate tf#退出虚拟环境

验证安装:

ubuntu@ubuntu:~$ cat a.py
import numpy
import tensorflow as tf
a = numpy.zeros([3,2])
print(a)

Ubuntu20.04 安装Anaconda3 TensorFlow_第1张图片

你可能感兴趣的:(机器学习,深度学习)