Thanks to theidioms.com

Installing TensorFlow 2.0

TensorFlow course
Tutorial

Installing TensorFlow 2.0

Installing TensorFlow 2.0Installing TensorFlow 2.0

In this chapter, you will learn to install TensorFlow 2.0 on your local machine. TensorFlow 2.0 is tested and supported for Python 3.5–3.8 on the following 64-bit systems:

  • Ubuntu 16.04 or later
  • Windows 7 or later
  • macOS 10.12.6 (Sierra) or later (no GPU support)
  • Raspbian 9.0 or later

TensorFlow official documentation recommends the following two methods for installation:

1. Install using pip in Python

TensorFlow 2.0 can be installed using the pip python package manager by running the following commands on your system.

$ pip install --upgrade pip   # Upgrade pip

$ pip install tensorflow      # Install lastest stable release

$ pip install tensorflow-gpu  # Install GPU version of TensorFlow if you have a CUDA enabled GPU

2. Run a TensorFlow Docker Container

TensorFlow can be used by running the TensorFlow Docker Images.

$ docker pull tensorflow/tensorflow:latest-py3                          # Download latest stable image

$ docker run -it -p 8888:8888 tensorflow/tensorflow:latest-py3-jupyter  # Start Jupyter server 

After installation, TensorFlow can be imported into our code simply as shown below:

import tensorflow as tf

# Check tensorflow version
print(f'Tensorflow Version: tf.__version__}')
Tensorflow Version: 2.2.0

If you got any errors during installation, feel free to mention it in the comment section below. After successfully installing TensorFlow 2.0 on your local machine, head on to the next chapter on the basic data structures used in TensorFlow 2.0.


Are you interested in working with data? Get a free trial month of LinkedIn Learning and learn Data Science and Machine Learning courses using Python, R, and SQL from top instructors.

Enroll in any one of the courses from the following fields today on LinkedIn Learning and start your free month of learning:

Disclaimer: When you subscribe to LinkedIn Learning, we may earn a small commission as an affiliate. We love the platform so much so that we have been using it ourselves at The Click Reader.

Installing TensorFlow 2.0Installing TensorFlow 2.0

Leave your thought here

Your email address will not be published. Required fields are marked *