How to install TensorFlow, Keras and PyTorch into Python 3.12.1

1.2k Views Asked by At

I wanted to do some AI Programming on Python so I tried installing TensorFlow, Keras, Wasp and PyTorch on Hyper with pip3 install tensorflow for TensorFlow's CPU Version and Hyper didn't know what it was then for TensorFlow's GPU Version I tried: pip3 install tensorflow-gpu But Hyper couldn't install it and so I tried pip3 install pytorch for PyTorch and pip3 install keras for Keras and Hyper still displayed that it couldn't install them

I tried [pip3 install pytorch][pip3 install keras][pip3 install tensorflow][pip3 install tensorflow-gpu][pip3 install Wasp] a few times but Hyper would say that there was a subprocess exited with error and the same thing happened over and over again. I was expecting one day the errors would stop but they didn't.

2

There are 2 best solutions below

0
On

Your problem seems to be related with the 3.12 version of python. Change for the python 3.11 version, I did it and the Keras, TensorFlow installation worked fine, using pip

0
On

You cannot install Torch to date on Python 3.12 because Torch does not support this version yet. Meanwhile, you can downgrade the Python version and do all your stuff and wait for the Torch to support the latest version of python.