使用pyinstaller时缺少dll文件 [英] Missing dll files when using pyinstaller

查看:808
本文介绍了使用pyinstaller时缺少dll文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!

我在使用python 3.5.2与qt5,pyqt5和sip14.8。
我也使用最新的pyinstaller bracnch(3.3.dev0 + g501ad40)。

I'm using python 3.5.2 with qt5, pyqt5 and sip14.8. I'm also using the latest pyinstaller bracnch (3.3.dev0+g501ad40).

我正在为一个基本的hello世界创建一个exe文件程序。

I'm trying to create an exe file for a basic hello world program.

from PyQt5 import QtWidgets
import sys

class newPingDialog(QtWidgets.QMainWindow):

def __init__(self):
    super(newPingDialog, self).__init__()
    self.setGeometry(50, 50, 500, 300)
    self.setWindowTitle("hello!")
    self.show()


app = QtWidgets.QApplication(sys.argv)
GUI = newPingDialog()
sys.exit(app.exec_())

起初,我曾经得到一些关于crt-msi的错误。所以我重新安装了SDK和c ++运行时,并将它们添加到我的环境中。
但现在我不断收到有关丢失的DLL的错误(qsvg,Qt5PrintSupport)

At first, I used to get some errors regarding crt-msi. So I've reinstalled SDK and c++ runtime and added them to my environment. But now I keep getting errors about missing dlls (qsvg, Qt5PrintSupport)

6296 WARNING: lib not found: Qt5Svg.dll dependency of C:\users\me\appdata\local\programs\python\python35\lib\site-pac
kages\PyQt5\Qt\plugins\imageformats\qsvg.dll
6584 WARNING: lib not found: Qt5Svg.dll dependency of C:\users\me\appdata\local\programs\python\python35\lib\site-pac
kages\PyQt5\Qt\plugins\iconengines\qsvgicon.dll
6992 WARNING: lib not found: Qt5PrintSupport.dll dependency of C:\users\me\appdata\local\programs\python\python35\lib
\site-packages\PyQt5\Qt\plugins\printsupport\windowsprintersupport.dll
7535 WARNING: lib not found: Qt5PrintSupport.dll dependency of c:\users\me\appdata\local\programs\python\python35\lib
\site-packages\PyQt5\QtPrintSupport.pyd
8245 INFO: Looking for eggs
8245 INFO: Using Python library c:\users\me\appdata\local\programs\python\python35\python35.dll
8246 INFO: Found binding redirects:

我已经检查并且两个DLL都存在并设置了PATH。我也试图手动将它们添加到我的dist文件夹中,但没有帮助。

I've checked and both dlls exist and have their PATH set. I also tried to manually add them to my dist folder, but it didn't helped.

我非常感谢您可能有任何建议!

I'll highly appreciate any advice you might have!

推荐答案

这可能更像是解决方法,Pyinstaller可能需要修复。

This may be more like a workaround and Pyinstaller might need fixing.

我发现指出包含 Qt5Core.dll Qt5Gui.dll 等的目录 - 路径 / p>

I found out that --paths argument pointing to the directory containing Qt5Core.dll, Qt5Gui.dll, etc. helped

pyinstaller --paths C:\Python35\Lib\site-packages\PyQt5\Qt\bin hello.py

这篇关于使用pyinstaller时缺少dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆