Discussions>How to install Tensorflow 2.0 on Ubuntu?>

How to install Tensorflow 2.0 on Ubuntu?

I fill I'm stuck on this. I had Tensorflow 1.15 and wanted to upgrade it to Tensorflow 2.0. I've removed and installed a lot of packages and nothing works, stuck on it and can't find a clear way to install the package. Could you help me with it? I'm using

  • Ubuntu 18.04
  • Python 3.6
2 votesLP262.00
1 Answers

First, I would recommend you remove all packages related to Tensorflow (even to TF2.0) to have a clean place. After that start to install TF2.0 packages. To see what you've got installed just run 

pip3 list or
pip3 list | grep tensorflow

You will see a couple of packages with TF1. Just remove all them by calling 

pip3 uninstall tensorflow tensorflow-gpu tensorboard tensorflow-estimator

Then start to install Tensorflow 2.0. By starting from Tensorflow 1.15 GPU and CPU support versions are merged into one package called "tensorflow".

pip install --upgrade pip
pip3 install tensorflow or
pip3 install tensorflow --user

The official documentation says, they tested this on 64-bit systems with

  • Python 3.5 – 3.7
  • Ubuntu 16.04 or later
  • Windows 7 or later
  • MacOS 10.12.6 (Sierra) or later (no GPU support)
  • Raspbian 9.0 or later

Also, make sure your pip is upgraded, because TensorFlow 2 packages require a pip version >19.0.

There are other installation ways like docker images or deployment systems and you need to take a look at the official doc of Tensorflow Installation

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?