Matthew Gilshnan
Matthew Gilshnan

Reputation: 131

Error when installing Tensorflow - Python 3.8

I'm new to programming and following a course where I must install Tensorflow. The issue is that I'm using Python 3.8 which I understand isn't supported by Tensorflow.

I've downloaded Python 3.6 but I don't know how to switch this as my default version of python.

Would it be best to set up a venv using python 3.6 for my program and install Tensorflow in this venv?

Also, I using Windows and Powershell.

Upvotes: 11

Views: 27599

Answers (7)

nights
nights

Reputation: 419

Python Versions 3.5 - 3.8 are supported now.

You can verify on this page: https://www.tensorflow.org/install/pip

Upvotes: 0

nexoma
nexoma

Reputation: 285

Worked on Python 3.8.2 (default, Mar 05 2020, 18:58:42) [GCC] on linux

pip3 install --upgrade tf-nightly

Upvotes: 0

Aashish Kumar
Aashish Kumar

Reputation: 2879

Tensorflow is only supported until python 3.7 as of now. You can check it here: https://www.tensorflow.org/install/pip

But there is a way to install it on Python3.8, just run the below command that will do your job:

python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

This command work on mac and windows both, I haven't tested on Linux.

Upvotes: 22

bennylp
bennylp

Reputation: 191

If you don't want to use Anaconda or virtualenv, then actually multiple Python versions can live side by side. I use Python38 as my default and Python35 for TensorFlow until they release it for Python38. If you wish to use the "non-default" Python, just invoke with the full path of the python.exe (or create a shortcut/batch file for it). Python then will take care of using the correct Python libs for that version.

Upvotes: 0

sourabh pathak
sourabh pathak

Reputation: 21

it would have been nice if you would have the share the error screenshot though as per i got the case

tensorflow work in both 3.8 and 3.6 just you have to check that you have 64bit version not 32 bit

you can acess both version from thier respective folder no need to install a venv

Upvotes: 0

MartinKondor
MartinKondor

Reputation: 432

Uninstall all your python versions and use the latest anaconda.

$ conda create --name tensorflow python=3.5

This way you create a virtual environment with python 3.5 which is supported by tensorflow.

So now you can install it.

$ activate tensorflow
(tensorflow) $ pip install tensorflow

Upvotes: 0

Josep Bové
Josep Bové

Reputation: 688

You should always use venv because by default every project on your system will use these same directories to store and retrieve site packages (third party libraries). At first glance, this may not seem like a big deal, and it isn’t really, for system packages (packages that are part of the standard Python library), but it does matter for site packages.

Consider the following scenario where you have two projects: ProjectA and ProjectB, both of which have a dependency on the same library, ProjectC. The problem becomes apparent when we start requiring different versions of ProjectC. Maybe ProjectA needs v1.0.0, while ProjectB requires the newer v2.0.0.

You can also take a look at anaconda, it’s the most populasr data sciencie platform and will be easy for you install tensorflow and jupiter notebook in just 2 clicks. Anaconda

Upvotes: 0

Related Questions