Install TensorFlow on window

Source: Internet
Author: User
Tags windows support

1. TensorFlow Introduction

November 29, the Google Brain Engineers team announced the inclusion of initial Windows support in TensorFlow 0.12.

TensorFlow announced that open source has just been in the past year. With Google's support, TensorFlow has become the most popular machine learning Open source project on GitHub. At the same time, Google also conducted a variety of research in the TensorFlow framework, open source of some of these projects, such as natural language processing, machine translation, image description, image classification and so on.

Google wrote on the developer blog: "The original Windows version of TensorFlow is the top priority of our work since open source." Although Windows users can already run TensorFlow in Docker containers, we still want to provide a more complete native experience, including support for GPUs. 」

With the release of the TensorFlow r0.12 release, this open source library now supports WINDOWS7, 10, and Server 2016. At the same time, this new version allows users to get the CUDA 8 GPU acceleration in tensorflow training. We have packaged the new version in PyPI. Now you can install TensorFlow using the command c:> pip install TensorFlow.

2. Download and install the python,python-pip2.1. Download Python and python-pip2.1.1. Python:

Https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe

3.5.2 version of I is the installation of this version, this link can be downloaded directly with the download tool.

Want to use other version can go to the official website download: https://www.python.org/downloads/windows/

However, I tried the 2.7 version, but the installation of TensorFlow failed.

2.1.2. Pip:

https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/ Pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9

The latest version of the PIP,PIP is the installation of TensorFlow is not a few tools

2.2. Install the python2.2.1. Open an executable file

And the steps to install the other software are similar, be careful to modify the path, because you need to set environment variables after installation.

2.2.2. Setting environment variables (WIN10)

Right click on this computer and click Properties.

Click Advanced System Settings.

Click Environment Variables.

Click the path variable, then edit it, and if not, create a new path variable.

Be careful to ";" Semicolon ends with semicolons, semicolons, and semicolons.

After the addition has been determined to the end, just open all the windows are key OK, OK, OK.

If this is the case, your environment variable is not configured and you need to reconfigure the environment variable

2.3. Install the pip2.3.1. Unpacking the installation package

I extracted it with a quick pressure, extracted two times to get the pip-9.01 folder

2.3.2. Installation

In this folder, hold down the SHIFT key and click the right mouse button

Click here to open the command window

Execute: Python setup.py install/mount PIP command

And then you jump a whole lot of stuff, no tube.

The installation is complete.

2.3.3. Configuring Environment variables

The installation path of the PIP is inside the scripts of the Python installation path.

So the path to the PIP is also added to the path variable, such as:

3. Install the TensorFlow3.1. For more details on TensorFlow Windows support, read r0.12 version notes 3.1.1. PyPI Address:

Https://pypi.python.org/pypi/tensorflow

3.1.2. TensorFlow Release 0.12.0 Address:

Https://github.com/tensorflow/tensorflow/releases

3.2. Installation

If the above Python and PYTHON-PIP installation is not a problem, simply execute a command to install TensorFlow successfully.

C:> pip Install TensorFlow

The dependencies required by TensorFlow are automatically installed:

My is already installed, so the version number, dependence of what show out.

4. Test your first TensorFlow program 4.1. Test code:

C:\>python

>>> Import TensorFlow as TF

>>> Hello = tf.constant (' Hello, tensorflow! ')

>>> sess = tf. Session ()

>>> Sess.run (Hello)

Hello, tensorflow!.

>>> a = tf.constant (10)

>>> B = tf.constant (32)

>>> Sess.run (a+b)

42

>>>

4.2. Test success:

Since I've installed two versions of Python, I've changed the name of Python so you can use Python directly.

4.3. Egg time

1. The first thing programmers usually do when they are in touch with a new language is to write a Hello World program, which derives from the hopes of the first group of great gods for computer programs, hoping that they will be as friendly as a newborn to announce its arrival to the universe.

2. The meaning of the number 42 is very profound. According to a famous science fiction "Hitchhiker's Guide to the Milky Way", 42 is an answer to the question of "Life, the Universe and Everything" (huh? You asked me what the problem was? )。 Google's founders are probably also a fan of the novel, because Google has embedded the eggs in their search engines, and Google has a "42" model outside its headquarters.

Install TensorFlow on window

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.