Ubuntu16.04 method for installing TensorFlow (CPU) based on Anaconda (py3.6)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.