Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does pip not install tensorflow version below 2.12?

I'm currently following the tensorflow guide at https://www.tensorflow.org/install/pip#windows-native_1.
Up until step 6, everything works, however I cannot install the proper tensorflow version.
Only the version 2.12 can be installed.

When testing if it is installed for my GPU with

python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

it shows me an empty list, so it probably doesn't work.

Does anyone know why this happens and how I can fix this?

like image 435
Mikecraft1224 Avatar asked Sep 17 '26 21:09

Mikecraft1224


2 Answers

Python 3.10 is the last version tensorflow-gpu 2.10.0 supports. Try installing Python 3.10.11.

It worked for me.

like image 107
Vlad Avatar answered Sep 20 '26 11:09

Vlad


Only Tensorflow up to 2.10 is supported for GPU setup in Windows OS. Unfortunately, You cannot install it using pip install tensorflow-gpu==2.10 as you will receive

Could not find a version that satisfies the requirement

You should install it from a wheel file at pypi.org/project/tensorflow-gpu/2.10.0/#files. One way to do it is to download the appropriate (same python version, same OS ...) .whl file locally, then

(venv) >> pip install <filename>.whl 
like image 30
Alexis Avatar answered Sep 20 '26 11:09

Alexis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!