用PySide的executab创建python程序

2024-04-26 11:40:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个python程序:

import sys
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtWebKit import *


app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("htpp://www.google.com"))
web.show()
web.resize(650, 750)
web.setWindowTitle('Website')

sys.exit(app.exec_())

我用过谷歌举个例子。但是如果我想用py2exe来实现这个程序的可执行文件,但是它不起作用。我得到这个错误:

enter image description here

对于没有PySide的其他程序,它确实可以工作。但PySide却没有。我该怎么做?在


Tags: fromimport程序webappsysloadpyside
2条回答

缺少DLL。有问题的DLL可以(至少以前)从微软下载免费的编译器包获得。在

或者,请确保此进程设置了正确的路径来查找有问题的DLL。在

您需要Microsoft Visual C运行时。在

你应该看看这个:http://qt-project.org/wiki/Packaging_PySide_applications_on_Windows。在py2exe教程中,它解释了应该安装的运行时。在

相关问题 更多 >