小编Bri*_*str的帖子

cx_freeze 创建多个程序实例

我正在尝试使用编译一些Python 3.3代码cx_freeze,编译后生成的test.exe文件将创建无限数量的程序实例,导致我的 Windows 7 系统变得不稳定。它在 Python 中运行时按预期工作,但一旦编译就会导致问题。这是我在主脚本中的导入:

import sys
from multiprocessing import Pool, Queue
from threading import Thread
from time import sleep, time
from inspect import getmembers
from PyQt5 import QtWidgets, QtCore, QtGui
from main_ui import Ui_MainWindow           # Generated UI from pyuic, imports 
                                            # QtWidgets, QtCore, and QtGui
from devices import Device1, Device2        # Both are serial.Serial objects
Run Code Online (Sandbox Code Playgroud)

setup.py脚本:

import sys
from cx_Freeze import setup, Executable

product_name = 'Product Name'

path_platforms = …
Run Code Online (Sandbox Code Playgroud)

cx-freeze python-3.x python-3.3 pyqt5

5
推荐指数
1
解决办法
1275
查看次数

标签 统计

cx-freeze ×1

pyqt5 ×1

python-3.3 ×1

python-3.x ×1