Ubuntu 18.04 installation Tensorflow (CPU)

First, the first update source software source cloud Ali, increase download speed

(1) back up the current default is the official source list

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

List (2) delete the sources.list file, delete all content

sudo gedit /etc/apt/sources.list1

(3) After replacing the contents, save

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

4) Update Source List

sudo apt-get update

Second, the installation Tensorflow (Python3.6.7 / CPU)

(1) installation package management pip Python3

sudo apt-get install python3-pip python3-dev

Ubuntu 18.04 installation Tensorflow (CPU)

(2) Installation tensorflow

(Automatically install dependent library numpy, tensorboard, six, protobuf, html5lib, bleach, werkzeug, markdown)

Ubuntu 18.04 installation Tensorflow (CPU)

(3) Test tensorflow

Ubuntu 18.04 installation Tensorflow (CPU)

Guess you like

Origin www.linuxidc.com/Linux/2019-06/158934.htm