10

Whenever I try to install TensorFlow with pip on Python 3.8, I get the error that TensorFlow is not found. I have realized later on that it is not supported by Python 3.8.

How can I install TensorFlow on Python 3.8?

Adriaan
  • 15,941
  • 7
  • 35
  • 67

4 Answers4

12

As of May 7, 2020, according to Tensorflow's Installation page with pip, Python 3.8 is now supported. Python 3.8 support requires TensorFlow 2.2 or later.

You should be able to install it normally via pip.


Prior to May 2020:

As you mentioned, it is currently not supported by Python 3.8, but is by Python 3.7.

You want to have virtualenv installed. You also need Python 3.7. Then you can just start a virtualenv with -p python3.7 and install it using pip like you did before:

virtualenv --system-site-packages -p python3.7 DEST_DIR

source ./DEST_DIR/bin/activate

pip install --upgrade pip

pip install --upgrade tensorflow
Adriaan
  • 15,941
  • 7
  • 35
  • 67
Nizar
  • 1,362
  • 1
  • 13
  • 20
  • 1
    More information about tensorflow installation and supported versions on official documentation : https://www.tensorflow.org/install/pip – dgp Jan 19 '20 at 11:22
  • The question is asking for a method of forcing the installation of tf2 for py3.7 with a py3.8 environment. – Isaías Apr 11 '20 at 19:42
2

Tensorflow does not support Python 3.8 at the moment. The latest supported Python version is 3.7. A solution is to install Python 3.7, this will not affect your codes since Python 3.7 and 3.8 are very similar. Right now Python 3.7 is supported by more frameworks like TensorFlow. Soon Python 3.8 will have more supported frameworks, and that´s when you can install TensorFlow for Python 3.8.

Adriaan
  • 15,941
  • 7
  • 35
  • 67
Bernardo Olisan
  • 559
  • 1
  • 13
0

Currently it does support python 3.8 all we need to do is create a new environment ,select 'update index' , select uninstalled and one can find tensorflow for installing

-1

I tried this in Anaconda and faced problems when installing Tensorflow 1.14.0.

Steps to Resolve

  1. Create a new environment

  2. Check the python version

    conda search python
    

I found version 3.8.0. Tensorflow 1.14 is not supported with this version.

  1. Next step is to downgrade python in new environment to 3.7.0

    conda install python=3.7.0

Once this is done, install TensorFlow 1.14.

M--
  • 18,939
  • 7
  • 44
  • 76
  • 1
    The person is asking how to install Tensorflow with python 3.8, but your answer is downgrading. Not an appropriate answer. – CognitiveRobot Sep 04 '20 at 03:59