Shashank Walake
Shashank Walake

Reputation: 47

Installing Tensorflow when Python 3.9 is installed on Path?

2 Versions of Python 3.9 and 3.8.6 are installed on Win 10. I Also want Tensorflow installed. But Pip recognises only Py 3.9 and hence does not installs tf locally. Is there a way out for this.

Upvotes: 2

Views: 63683

Answers (8)

Karthikeyan VK
Karthikeyan VK

Reputation: 6006

I did two things to make it work.

  1. After pip install tensorflow, restarted my VS Code
  2. Change the interpreter from 3.9 to 3.7, so it started installing ipython relevant packages and then changed it back to 3.9.

Upvotes: 0

Yulijana Fred
Yulijana Fred

Reputation: 81

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

This work with my python 3.9

Upvotes: 7

elotech
elotech

Reputation: 501

Your system is defaulting to python 3.9 because it is higher up in the system path list, so it is seen first. search for environment variable in windows then click on environment variable. Then under system variable, search for path and then move the python3.8 higher up than python3.9. Your system will now see 3.8 as default.

Upvotes: 0

Prashanth Bijamwar
Prashanth Bijamwar

Reputation: 133

Try this command

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

Upvotes: 12

Fazlul Hoque
Fazlul Hoque

Reputation: 129

The following command should be work for python version 3.9: python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

Upvotes: 4

Farouk
Farouk

Reputation: 271

This worked for me:

python3.8 -m pip install tensorflow

I think pip uses the latest python version, so you have to tell pip to install with python3.8 or use the beta version of tensorflow:

pip install tf-nightly

Upvotes: 2

Ashish Kumar
Ashish Kumar

Reputation: 11

Change you're Environment variable from python 3.9 to python 3.8.6 .

1.search for environment variables in your pc see the pic --->. Environment variables

2.Now select environment variables option see pic --->. click on option

  1. Now edit the path of wanted python see pic --->. Edit

Upvotes: 0

Florian
Florian

Reputation: 115

For dealing with multiple Python Versions it is highly recommended to use virtual environments. It makes live much easier. For a detailed guide how to set them up read this: https://www.freecodecamp.org/news/manage-multiple-python-versions-and-virtual-environments-venv-pyenv-pyvenv-a29fb00c296f/

Upvotes: 2

Related Questions