Error “Keras requires TensorFlow 2.2 or higher”

后端 未结 4 749
情书的邮戳
情书的邮戳 2020-12-14 02:59

I just installed Visual Studio 2019 and Tensorflow, but I cannot import Keras because I get the following error message:

Keras requires TensorFlow 2.2 or

相关标签:
4条回答
  • 2020-12-14 03:12

    I was facing same issue just downgraded keras version to 2.3.1 and it was working

    pip install keras==2.3.1

    0 讨论(0)
  • 2020-12-14 03:20

    Following the advice given here, downgrading Keras did the trick for me without having to touch any other packages. Just do:

    pip install keras==2.3.0
    

    I hope this only remains a temporary issue and will be fixed in future versions of TensorFlow and Keras.

    Other possible solutions, are discussed here.

    0 讨论(0)
  • 2020-12-14 03:22

    I had the same issue caused by last keras release,what i remember did():

    1-Upgrade tensorflow:

      pip install --user --upgrade tensorflow-gpu
    

    (there might be some missing packages, just pip install them)

    2-Upgrade Tensorboard

    pip install --user --upgrade tensorboard
    

    (there might be some missing packages, just pip install them)

    3-Downgrade Keras

    pip install keras==2.3.1
    

    (latest version working for me)

    4-Downgrade tensorflow-gpu

    pip install --user --upgrade tensorflow-gpu==1.14.0
    

    (latest version working for me)

    Let me know if worked!


    Anaconda 2020.02

    Python 3.7

    CPU i3 8100

    OS Windows 10 64

    Nvidia GPU GTX1050TI

    CUDA 10.1

    0 讨论(0)
  • 2020-12-14 03:24

    you need to first upgrade pip:

    #TensorFlow 2 packages require a pip version >19.0
    pip install --upgrade pip
    

    then you can install tensorflow=2.2 with:

    pip install tensorflow==2.2
    

    then it worked for me.

    0 讨论(0)
提交回复
热议问题