cx_freeze Winerror 2 Система не может найти указанный файл - PullRequest
1 голос
/ 19 июня 2020

Привет, я работаю 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'
...