Install TensorFlow (CPU version)
Familiar with the Anaconda command, you can refer to http://www.jianshu.com/p/d2e15200ee9b
The official recommendation is that you have the GPU immediately, but you can also install a CPU version, and the command to create the environment is:
conda create -n tensorflow python=3.6
(Be sure to specify the Python version, I did not write python=3.6 at first, after various failures)
Download the installation package first, the download path is: HTTPS://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/CPU/TENSORFLOW-1.0.0-CP36-CP36M-LINUX_X86_64.WHL
After downloading, rename the WHL file to TENSORFLOW-1.0.0-PY3-NONE-LINUX_X86_64.WHL, or it will appear
Tensorflow-1.0.0-cp36-cp36m-linux_x86_64.WHL is not A supported wheel on this platform< Span class= "hljs-built_in" to the same error, specific reference https://github.com/tensorflow/tensorflow/issues/1990
Then go to the environment and install TensorFlow
< Span class= "Hljs-keyword" > SOURCE Activate TensorFlow #激活tensorflow环境
< Span class= "Hljs-keyword" >< Span class= "hljs-built_in" >cd/downloads # Switch to the folder where the WHL file is located
pip install--ignore-installed--upgrade tensorflow- 1.0.0-py3-none-linux_x86_64.whl #切记, do not use sudo pip, nor use PIP3, Then--ignore-installed--upgrade and other parameters can not be omitted, otherwise it will be wrong.
Here Source: http://blog.csdn.net/michaelliang12/article/details/60106686
Verifying the installation
Success.
(tensorflow)$ pythonimport tensorflow as tfhello = tf.constant(‘Hello, TensorFlow!‘)sess = tf.Session()sess.run(hello)
There are problems, runtime, two versions have warning, not error, but do not affect the results, but the execution speed is relatively slow, it is said that because of the different framework of the migration, the CPU has not been compiled, he suggested you for faster speed, can be compiled from the code, execution speed will be faster.
However, the use of TensorFlow in the Spyder or Pycharm is not recognized at this time.
Open your Anaconda folder, find Envs open TensorFlow will sitepack-ages everything inside the test to Anaconda/lib/python2.7/sitepack-ages
You can now import TensorFlow using the Spyder Pycharm
Source: http://blog.csdn.net/zzw000000/article/details/51203331
Ubuntu16.04 method for installing TensorFlow (CPU) based on Anaconda (py3.6)