OpenPPL / ppq

PPL Quantization Tool (PPQ) is a powerful offline neural network quantization tool.
Apache License 2.0
1.54k stars 232 forks source link

执行python setup.py install报错: 动态链接库(DLL)初始化例程失败,如何解决 #577

Open wyyt1202 opened 2 weeks ago

wyyt1202 commented 2 weeks ago

(mytorch) E:\learn_file\python\Quantify\ppq>python setup.py install E:\learn_file\python\Quantify\ppq\ppq__init__.py:10: UserWarning: You are importing ppq within its own root folder (E:\learn_file\python\Quantify\ppq). warnings.warn(message.format(os.getcwd()))

  ____  ____  __   ____                    __              __
 / __ \/ __ \/ /  / __ \__  ______ _____  / /_____  ____  / /
/ /_/ / /_/ / /  / / / / / / / __ `/ __ \/ __/ __ \/ __ \/ /

/ / / // // / // / // / / / / // // / // / / // // /____\__,/_,// //_/__/__//

Traceback (most recent call last): File "E:\learn_file\python\Quantify\ppq\setup.py", line 2, in from ppq.core import PPQ_CONFIG File "E:\learn_file\python\Quantify\ppq\ppq__init.py", line 13, in from ppq.api.setting import (ActivationQuantizationSetting, DispatchingTable, File "E:\learn_file\python\Quantify\ppq\ppq\api__init__.py", line 1, in from ppq.lib import (register_calibration_observer, register_network_exporter, File "E:\learn_file\python\Quantify\ppq\ppq\lib__init__.py", line 44, in from .extension import (register_calibration_observer, File "E:\learn_file\python\Quantify\ppq\ppq\lib\extension.py", line 7, in from .common import EXPORTERS, PARSERS, QUANTIZER_COLLECTION File "E:\learn_file\python\Quantify\ppq\ppq\lib\common.py", line 2, in from ppq.parser import (AscendExporter, CaffeExporter, CaffeParser, File "E:\learn_file\python\Quantify\ppq\ppq\parser__init__.py", line 9, in from .nxp_exporter import NxpExporter File "E:\learn_file\python\Quantify\ppq\ppq\parser\nxp_exporter.py", line 1, in import onnx File "D:\App\Anaconda\envs\mytorch\lib\site-packages\onnx\init__.py", line 77, in from onnx.onnx_cpp2py_export import ONNX_ML ImportError: DLL load failed while importing onnx_cpp2py_export: 动态链接库(DLL)初始化例程失败。

wangtiance commented 4 days ago

你的onnx是不是1.17,我试过降级到1.16.1可以:

https://blog.csdn.net/qq_38702496/article/details/141052666