参考:官方解决方案
问题:
ImportError: DLL load failed while importing onnxruntime_genai: A dynamic link library (DLL) initialization routine failed.
File "D:\Python\envs\llm\Lib\site-packages\onnxruntime\__init__.py", line 74, in <module>
raise import_capi_exception
File "D:\Python\envs\llm\Lib\site-packages\onnxruntime\__init__.py", line 24, in <module>
from onnxruntime.capi._pybind_state import (
File "D:\Python\envs\llm\Lib\site-packages\onnxruntime\capi\_pybind_state.py", line 32, in <module>
from .onnxruntime_pybind11_state import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing onnxruntime_pybind11_state: 动态链接库(DLL)初始化例程失败。
解决:
conda install conda-forge::vs2015_runtime 

Comments | NOTHING