Install Tensorflow2

Just a quick installation procedure for tensorflow2 (tf2).

If you’re like me and still on Ubuntu 16.04 with a python 3.5 version, you might have experience that a simple pip install does not work properly?

pip install tensorflow==2.0.0-alpha0

End up by a:

2.0.0-alpha0 not found

Before you start yieling at Google and crying at your computer, just relax and read what follows. Indeed, tf2 is available through pip only if you run python 3.7 thus if you have a version of python under 3.7, you’re stuck…

No of course there is a very simple way to install tf2 alpha0.

    1. Go there: GPU or there No GPU
    2. Dowload the version corresponding to your os (Linux of course), and your python version.
    3. Now you have a wheel of tensorflow.
    4. In order to test it I advise you to do so in a virtuan environment. I personnaly use virtualenv:

virtualenv -p /usr/bin/python3.6 venv

source venv/bin/activate

  1. Install tensorflow:

pip install /home/mycomputer/Downloads/tensorflow_gpu-2.0.0-cp3.X-cp3.Xm-manylinux1_x86_64.whl

Great ! Now you’re all set to work on tensorflow2 in a virtualenv.

Don’t forget to get out of your environment once done:

More on virtual environments.

More on tf2:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: