cannot import name 'get_all_providers'
C:\Users\ADMINI~1\AppData\Local\Temp\2\_MEI87882\onnxruntime\capi\_pybind_state.py:13: UserWarning: Cannot load onnxruntime.capi. Error: 'DLL load failed: 找不到指定的模块。'
Traceback (most recent call last):
File "MaskServer.py", line 22, in <module>
File "d:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "onnx_mask\utils.py", line 11, in <module>
File "d:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "onnx_mask\lib\RetinaFace\retinaface.py", line 1, in <module>
File "d:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "site-packages\onnxruntime\__init__.py", line 12, in <module>
ImportError: cannot import name 'get_all_providers'
[12408] Failed to execute script MaskServer
原因:版本太高了
解决方法:
pip install onnxruntime==1.2.0