cx_Freeze:主脚本中的Python错误

问题描述 投票:0回答:1

我想用cx_freeze创建我的脚本的可执行文件。

我用steup.py:

import sys 
from cx_Freeze import setup, Executablesetup(
name = "balance",
version = "3.1",
description = "exported data integral",
executables = [Executable("balance1.py", base = "Win32GUI")])

接下来我在cmd中运行它。然后当我在构建文件夹中启动.exe时,我得到:

我正在使用Pyzo分布。

什么可能导致这样的错误?

python cx-freeze
1个回答
0
投票

使用pip安装的cx_freeze版本中存在错误。

从此处下载预先打包的版本(选择适合您的系统版本):http://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze

使用pip安装'wheel':

pip install wheel

然后使用pip安装下载的whl文件:

pip install cx_freeze_xxx.whl
© www.soinside.com 2019 - 2024. All rights reserved.