美文网首页PyQt
pyinstaller 打包pyqt程序无法启动问题解决

pyinstaller 打包pyqt程序无法启动问题解决

作者: 木兮家先生 | 来源:发表于2016-12-30 15:14 被阅读909次

    pyinstaller打包的程序启动报错:

    Traceback (most recent call last):
      File "site-packages\pyinstaller-3.3.dev0-py3.5.egg\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py", line 46, in <module>
      File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.3.dev0-py3.5.egg\PyInstaller\loader\pyimod03_importers.py", line 573, in load_module
        module = loader.load_module(fullname)
    ImportError: DLL load failed: The specified module could not be found.
    Failed to execute script pyi_rth_qt5plugins
    

    由于加载dll路径依赖有问题

    解决方法:

     # 打包时增加 path 参数 指定qt dll目录
    pyinstaller --path C:\Python35-32\Lib\site-packages\PyQt5\Qt\bin test.py
    

    参考

    相关文章

      网友评论

      • d00dee6a6601:我添加了路径后可以打开程序,但是当我的程序调用WebEngine时,程序发生了错误:Could not find QtWebEngineProcess.exe。
        windows10
        python3.5.4
        PyQt5.9

      本文标题:pyinstaller 打包pyqt程序无法启动问题解决

      本文链接:https://www.haomeiwen.com/subject/xwpmvttx.html