Install TensorFlow with Ubuntu system

Source: Internet
Author: User

Recently in the study of Google new Open source deep learning framework TensorFlow. When you find it, you need to rely on python2.7.x; the Linux I used to use is CentOS. And CentOS is not updated, the inside of the python is generally python2.6 below. Not only that, many components in the system depend on python2.6, so you can't replace it. Helpless under, choose Ubuntu. Here are some questions you'll encounter with installing TensorFlow with Ubuntu.

1. Ubuntu cannot connect with WINSCP

Workaround:

(1), the use of bridging the way to surf the internet (due to the virtual machine installed operating system)

(2), use ps-e |grep ssh to see if there is an sshd process open. If not, you need to install Openssh-server

Installation method: sudo apt-get install Openssh-server

Start the appropriate process:/ETC/INIT.D/SSH start

(3), at this time need reboot system

(4), because the original Ubuntu root user is not activated, you need to modify the root user password to activate the root user.

You are ready to connect.

2, install TensorFlow.

Since my Ubuntu is the latest version (UBUNTU-16.04-DESKTOP-AMD64), the python inside is 2.7.11. Therefore meet the requirements. Since the TensorFlow has three mounting options, the PIP installation method is used here. Start installing TensorFlow below:

(1) First install PIP

 sudo apt-get install python-pip python-dev

(2) Installing TensorFlow with PIP

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

Once installed, as shown in:

According to the yellow hint above, ask me to upgrade PIP: So I just follow his request upgrade, execute: Pip install--upgrade pip

3, check whether the TensorFlow installation success

Use the following code to test whether the TensorFlow installation was successful:

$ python...>>> import tensorflow as tf>>> hello = tf.constant(‘Hello, TensorFlow!‘)>>> sess = tf.Session()>>> print(sess.run(hello))Hello, TensorFlow!>>> a = tf.constant(10)>>> b = tf.constant(32)>>> print(sess.run(a + b))42>>>
下面是我执行的结果如所示:

4, installation Python-numpy, Python-scipy,python-matplotlib

sudo apt-get install Python-numpy

sudo apt-get install python-scipy

sudo apt-get install Python-matplotlib

Verify that the installation was successful: (as shown)

 

Install TensorFlow with Ubuntu system

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.