0% found this document useful (0 votes)
2 views

Installing TensorFlow 2

This document provides a step-by-step guide for installing TensorFlow 2 on Windows using both pip and conda. It details the necessary prerequisites, including downloading Python 3.5.x and Microsoft Visual C++ 2015, as well as the installation process for TensorFlow. Additionally, it includes instructions for verifying the successful installation of TensorFlow and setting it up through Anaconda.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Installing TensorFlow 2

This document provides a step-by-step guide for installing TensorFlow 2 on Windows using both pip and conda. It details the necessary prerequisites, including downloading Python 3.5.x and Microsoft Visual C++ 2015, as well as the installation process for TensorFlow. Additionally, it includes instructions for verifying the successful installation of TensorFlow and setting it up through Anaconda.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 15

Installing TensorFlow 2

Download TensorFlow and install in our system in 2 ways:

o TensorFlow has only supported 64-bit Python 3.5.x or Python 3.6.x on Windows

o When we download the Python 3.5.x version, it comes with the pip3 package manager.
(Which is the program that we are going to need for our users to install TensorFlow on
Windows).

Step 1: Download Python from the below link :


https://www.python.org/downloads/release/python-352/

After that,
Step 3: We will be brought to another page, where we will need to select either the x86-64 or amd64
installer to install Python.

We use here Windows x86-64 executable installer.

Now, Python is installing successfully.


Step 5: Now, we will be able to see the message "Set-up was successful." A way to confirm that it hs
installed successfully is to open your Command Prompt and check the version.

What is pip?

pip is known as a package management system which is used to install and manage the software
package, which is written in Python or any other languages. pip is used to download, search, install,
uninstall, and manage the 3rd party python package. (pip3 is the latest version of it which comes
with new Python 3.5.x version that we had just downloaded)
Installing our TensorFlow
Once we have downloaded the latest version of Python, we can now put our finishing touches by
installing our TensorFlow.

Step 1: To install TensorFlow, start the terminal. Make sure that we run the cmd as an administrator.

If we do not know how to run your cmd as an administrator

Here's how we can run in our cmd as an administrator.

Open the Start menu, search for cmd, and then right-click on it and Run as an administrator.
Step 2: Once we are done with that, then we have to write the command in command prompt for
finish installing Tensorflow in our Windows.

Enter this command:

1. C:\pip3 install -upgrade tensorflow


Now, TensorFlow is successfully installed in our system.

Testing our TensorFlow

Here, we try and prove whether our new TensorFlow works smoothly without any problems.

Below is an example that you can write to the test.

TensorFlow is successfully working now.

Otherwise, If we are getting any problem to run the program, then we have to install Microsoft
Visual C++ 2015. And set up in our system then the TensorFlow will be run in the system.

We can download Microsoft Visual C++ 2015 from the below link: https://www.microsoft.com/en-
us/download/confirmation.aspx?id=53587

We can download from here.


Choose the vc_redist.x64.exe on the page and click on "Next" after that it will be downloaded.

At last, it will successfully installed in our system.


Installation of TensorFlow through conda
In our previous tutorial of TensorFlow, we learn how to install TensorFlow through pip. In this
tutorial, we understand that how to install TensorFlow through Conda. Here, we need anaconda
Navigator to set-up the platform.

These are the following steps which are given below:

Firstly, we have to open the official site of Anaconda and download Anaconda from the below
link: https://www.anaconda.com/distribution/

After that, we have to download Anaconda from below highlighted Python 2.7 version.

It will successfully be downloaded in our system. After that, we have to install Anaconda in our
system.
Click on "Next."

Click on "I Agree."


Again click on "Next."

Click on "Next" again.


Click on "Install."

Click on "Next."
Click on "Next."

Click on "Next."
After clicking on "finish."

It will successfully installed in our system.

After that, we have to run the given command to set-up the TensorFlow and libraries.

1. Conda create -n tensorflow pip python.


Here, we are downloading and installing the essential things which are used in TensorFlow to work.
After that, we have to check that TensorFlow is working or not in our system.

So, according to the above screenshot, TensorFlow is successfully working in our system.

You might also like