Chinese help website http://wiki.jikexueyuan.com/project/tensorflow-zh/
The installation process, it is recommended to use pip, python 2.7.12
sudo apt-get install python-pip python-dev
When installing, there may be an error that the pip module is incorrect, that is, python-pip conflicts with the pip installed by itself, then it needs to be uninstalled
sudo apt remove python-pip
Before installing tensorflow, whether it is the latest pip version or not, it is best to update it, but it seems to have no specific effect. The command is as follows:
sudo pip install --upgrade pip
You may also need the -H option to increase sudo directory permissions
You can change the pip source address, greatly improve the download speed, and create a folder and file ~/.pip/pip.conf with the following contents
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=mirrors.aliyun.com
TensorFlow can install both CPU and GPU versions, and install the CPU version
sudo pip install tensorflow
There is an uninstall error of a package, which can be ignored
sudo pip install tensorflow --ignore-installed enum
Install the GPU version
sudo pip install tensorflow-gpu
You can pass the session test of the following tf