错误:ImportError: DLL load failed while importing onnxruntime_pybind11_state: 动态链接库(DLL)初始化例程失败。

Traceback (most recent call last):
File “D:\Python310\lib\runpy.py”, line 196, in run_module_as_main
return run_code(code, main_globals, None,
File “D:\Python310\lib\runpy.py”, line 86, in run_code
exec(code, run_globals)
File "D:\Python310\Scripts\labelme.exe_main
.py", line 4, in
from labelme.main import main
File "D:\Python310\lib\site-packages\labelme_main
.py", line 15, in
from labelme.app import MainWindow
File “D:\Python310\lib\site-packages\labelme\app.py”, line 21, in
from labelme.automation import bbox_from_text
File “D:\Python310\lib\site-packages\labelme_automation\bbox_from_text.py”, line 6, in
import osam
File "D:\Python310\lib\site-packages\osam_init
.py", line 5, in
from . import apis # noqa: F401
File “D:\Python310\lib\site-packages\osam\apis.py”, line 5, in
import onnxruntime
File "D:\Python310\lib\site-packages\onnxruntime_init
.py", line 61, in
raise import_capi_exception
File “D:\Python310\lib\site-packages\onnxruntime_init_.py”, line 24, in
from onnxruntime.capi._pybind_state import (
File “D:\Python310\lib\site-packages\onnxruntime\capi_pybind_state.py”, line 32, in
from .onnxruntime_pybind11_state import * # noqa
ImportError: DLL load failed while importing onnxruntime_pybind11_state: 动态链接库(DLL)初始化例程失败。

问题解决:
这个错误 ImportError: DLL load failed while importing onnxruntime_pybind11_state: 动态链接库(DLL)初始化例程失败 表明在导入 onnxruntime 库时,Python 无法加载必要的动态链接库(DLL)文件。

  • 解决办法一:
    卸载重新安装onnxruntime

    pip uninstall onnxruntime
    pip install onnxruntime
    
  • 解决办法二:
    降低版本,使用1.14.1版本

    pip install onnxruntime-gpu==1.14.1
    

基本可以解决

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值