ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip install tensorflow`

Viewed 1231

How I can solve this problem? I work on : Pycharm python 3.6 keras 2.4.3

I try many times to install tensorflow but the install is failed in each time.

This error when I running: ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow

This error when I try to install the tensorflow:

enter image description here

2 Answers

You should do what it says, and run it from the command line. pip install tensorflow. But the problem is that you are not using the latest version of pip. Use python -m pip install –upgrade pip. Then re-run everything. All from the command line. And check that you are using the same python interpreter.

This is likely to do with how you have environments set up in Pycharm. I would try what they are suggesting: try installing from the terminal (using the same environment). Better yet, create a new environment and install everything at the same time (i.e. Tensorflow, Keras)

Related