python - cx_freeze Winerror 2 系统找不到指定的文件
问题描述
嗨,我正在运行 Windows 10 64 位。我正在尝试从 python 文件创建一个可执行文件。我为此使用 cx_freeze,但出现错误。这是我使用的代码
import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"]}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "My program",
version = "1.0.0",
description = "My program",
options = {"build_exe": build_exe_options},
executables = [Executable(Main.py", base=base, icon="Video Cut V1.0.0.ico")])
这是我得到的错误。
running build
running build_exe
creating directory build\exe.win-amd64-3.8
copying
C:\Users\.3.8_a8p0\site-packages\cx_Freeze\bases\Win32GUI.exe -> \exe.win-amd64-3.8\Main.exe
copying C:\Program
Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\python38.dll -> build\exe.win-amd64-3.8\python38.dll
error: [WinError 2] Het systeem kan het opgegeven bestand niet vinden: 'build\\exe.win-amd64-3.8\\Video Cut.exe'
解决方案
推荐阅读
- vue.js - Vuex:尝试在 Getter 中运行代码块
- c# - 如何将自定义模板组件中的值绑定到我的 asp.net 页面中的后端模型
- flutter - 未处理的异常NoSuchMethodError:方法'[]'在flutter中被调用为null
- javascript - word-wrap: 断字;修复或替代
- c# - 在异步函数中调用非异步方法
- kubernetes - 无法使用 Azure Kubernetes 服务中的负载均衡器服务访问应用程序
- r - 获取数据框中前 n 个变量的总和
- pandas - 使用训练数据统计填充熊猫中的 NaN 值
- powershell - 验证后发送电子邮件的 Powershell 脚本
- c# - 访问动态创建的对象的事件 C#