简体   繁体   English

使用PySide将python程序制作为可执行文件

[英]Make a python program with PySide an executable

I have a python program: 我有一个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_())

I used google.com just for example. 我仅以google.com为例。 But if i want to make an executable of this program with py2exe but it wont work. 但是,如果我想用py2exe做这个程序的可执行文件,但它不能工作。 I get this error: 我收到此错误:

在此处输入图片说明

With other programs without PySide it does work. 对于没有PySide的其他程序,它确实可以工作。 But with PySide it doesnt. 但是使用PySide却没有。 How can I make it work? 我该如何运作?

You need Microsoft Visual C runtime. 您需要Microsoft Visual C运行时。

You should take a look at this: http://qt-project.org/wiki/Packaging_PySide_applications_on_Windows . 您应该看一下: http : //qt-project.org/wiki/Packaging_PySide_applications_on_Windows In the py2exe tutorial it explains about the runtime you should install. 在py2exe教程中,它说明了您应该安装的运行时。

You are missing a DLL. 您缺少一个DLL。 The DLL in question can be (at least formerly) obtained from Microsoft by downloading their free compiler package. 有问题的DLL可以(至少以前)通过下载Microsoft的免费编译器包从Microsoft获得。

Alternatively, ensure that this process has the right paths set to find the DLL in question. 或者,请确保此过程具有设置正确的路径以查找有问题的DLL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM