Steve Williams
Steve Williams

Reputation: 61

Can't install tensorflow on python 3.9

When I try to install tensorflow on python 3.9 I get following error:

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Is not there any tensorflow for 3.9? What do you guys recommend? Can I install other version of python beside the existing version?

Upvotes: 6

Views: 9072

Answers (3)

hackr
hackr

Reputation: 81

The original poster did not mention what type of computer or operating system he was using while attempting to install TensorFlow alongside Python 3.9. The error could be linked to working on a 64-bit Mac with the M1 chip (I recently experienced the same error described above while working on a Mac M1 in a Miniconda environment with Python 3.9.13). I solved the error by running

python3 -m pip install tensorflow-macos

from Terminal (in the Miniconda environment). TensorFlow installed normally alongside Python 3.9.13.

I do recommend installing Miniconda (or Anaconda as others have suggested), because it will allow you to easily create development environments with whatever version of Python modules or dependencies you require at the moment. See https://docs.conda.io/en/latest/miniconda.html. The larger Anaconda comes with a user-friendly 'Navigator' GUI which enables you to choose which environment is used to open a Jupyter notebook or other development environment, several of which come with Anaconda. See https://docs.anaconda.com/anaconda/install/

Upvotes: 3

hhb
hhb

Reputation: 81

This is terrible with newer versions of Python that are not compatible with the machine learning module package. So my approach is to keep the existing version 3.9 and the computer is using Anaconda to install a virtual environment with 3.7. When using vscode or pycharm, just remember to set it to that 3.7 Python environment.

Upvotes: 0

Talha Junaid
Talha Junaid

Reputation: 2405

Right now tensorflow does not have a build for python3.9 The latest one is for python3.8

You can check the build files at PyPI https://pypi.org/project/tensorflow/#files

yes, you can install another version of python.

Upvotes: 2

Related Questions