1. Installing TensorFlow
Pip
Pip is a Python package installation and management tool, and the installation method is as follows
# ubuntu/linux 64-bit
$ sudo apt-get install python-pip python-dev
# Mac OS X
$ sudo easy_install pip
Installing TensorFlow
# Ubuntu/linux 64-bit, CPU only, Python 2.7:
$ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/l INUX/CPU/TENSORFLOW-0.8.0-CP27-NONE-LINUX_X86_64.WHL
# ubuntu/linux 64-bit, GPU enabled, Python 2.7. Requires CUDA Toolkit 7.5 and CuDNN v4.
# for other versions, see "Install from Sources" below.
$ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_ X86_64.WHL
# Mac OS X, CPU only:
$ sudo easy_install--upgrade six
$ sudo pip install--upgrade Https://stora Ge.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl
Python3 words
# Ubuntu/linux 64-bit, CPU only, Python 3.4:
$ sudo pip3 install--upgrade https://storage.googleapis.com/tensorflow/ LINUX/CPU/TENSORFLOW-0.8.0-CP34-CP34M-LINUX_X86_64.WHL
# ubuntu/linux 64-bit, GPU enabled, Python 3.4. Requires CUDA Toolkit 7.5 and CuDNN v4.
# for other versions, see "Install from Sources" below.
$ sudo pip3 install--upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp34-cp34m-linux _X86_64.WHL
# Mac OS X, CPU only:
$ sudo easy_install--upgrade six
$ sudo pip3 install--upgrade https://stor Age.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py3-none-any.whl
2. Problems encountered
An error occurred while importing TensorFlow, proving that it was not installed, and then decided to uninstall TensorFlow
Whether it's uninstalling TensorFlow or installing TensorFlow, there's a PIP problem.
sudo pip uninstall TensorFlow
then re-uninstall PIP and install
$ sudo apt-get remove Python-pip
$ TAR-XZVF pip-9.0.1.tar.gz
$ cd pip-9.0.1
Error when entering the following code
$ python setup.py Install
Running install
Error:can ' t create or remove files in install directory
Because the permissions are insufficient, the front plus sudo succeeds.
Installing TensorFlow again, a problem arises
TENSORFLOW-0.5.0-CP27-NONE-LINUX_X86_64.WHL is a supported wheel on this platform.
Workaround:
wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
sudo python2.7-m pip install https:// Storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Finally succeeded.