AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

运行后报错,出现以下问题,试过很多方法但就是不行,请问这怎么解决
图片说明

D:\ProgramFiles\Anaconda3\python.exe F:/课程/lpr-master/lpr.py
Using TensorFlow backend.
2020-03-06 14:30:11.878437: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-03-06 14:30:11.916527: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "F:/课程/lpr-master/lpr.py", line 12, in <module>
    from hyperlpr_py3 import pipline as pp
  File "F:\课程\lpr-master\hyperlpr_py3\pipline.py", line 5, in <module>
    from . import segmentation
  File "F:\课程\lpr-master\hyperlpr_py3\segmentation.py", line 22, in <module>
    K.set_image_dim_ordering('tf')
AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

Process finished with exit code 1

看了这位大大的解决方法,我输入命令后(pip install h5py==2.8.0rc1),却疯狂报错

图片说明
错误如下


D:\>pip install h5py==2.8.0rc1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting h5py==2.8.0rc1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/34/07/4f8f6e4e478e9eabde25dea6b4478016e625b2dac6aaded78ba0316c86fe/h5py-2.8.0rc1.tar.gz (263 kB)
Requirement already satisfied: numpy>=1.7 in d:\programfiles\anaconda3\lib\site-packages (from h5py==2.8.0rc1) (1.16.5)
Requirement already satisfied: six in d:\programfiles\anaconda3\lib\site-packages (from h5py==2.8.0rc1) (1.12.0)
Building wheels for collected packages: h5py
  Building wheel for h5py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\programfiles\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\93790\\AppData\\Local\\Temp\\pip-install-5rvq0cey\\h5py\\setup.py'"'"'; __file__='"'"'C:\\Users\\93790\\AppData\\Local\\Temp\\pip-install-5rvq0cey\\h5py\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\93790\AppData\Local\Temp\pip-wheel-f05vtg7o'
       cwd: C:\Users\93790\AppData\Local\Temp\pip-install-5rvq0cey\h5py\
  Complete output (1294 lines):(1294行错误)
    ..........
      building 'h5py.defs' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
  Rolling back uninstall of h5py
  Moving to d:\programfiles\anaconda3\lib\site-packages\h5py-2.9.0.dist-info\
   from d:\programfiles\anaconda3\lib\site-packages\~5py-2.9.0.dist-info
  Moving to d:\programfiles\anaconda3\lib\site-packages\h5py\
   from d:\programfiles\anaconda3\lib\site-packages\~5py
ERROR: Command errored out with exit status 1: 'd:\programfiles\anaco nda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\93790\\AppData\\Local\\Temp\\pip-install-5rvq0cey\\h5py\\setup.py'"'"'; __file__='"'"'C:\\Users\\93790\\AppData\\Local\\Temp\\pip-install-5rvq0cey\\h5py\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\93790\AppData\Local\Temp\pip-record-zz3q07kh\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\programfiles\anaconda3\Include\h5py' Check the logs for full command output.

https://blog.csdn.net/xs1997/article/details/101558737

你把vc++升级到17年