Ошибка:
Код: Выделить всё
cx_Freeze: Python error in main script
Traceback (most recent call last):
File
C:\Users\com\AppData\Local\Packages\PythonSoftwareF
oundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-pack
ages\Python311\site-packages\cx_Freeze\initscripts\_startup
_. py", line 141, in run
module_init.run(f" __ main_{name}")
File
"C:\Users\com\AppData\Local\Packages\PythonSoftwareF
oundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-pack
ages\Python311\site-packages\cx_Freeze\initscripts\console.p
y", line 25, in run
exec(code, main_globals)
File "DinoGame.py", line 27, in
FileNotFoundError: No such file or directory:
'C:\Users\com\DinoGame\build\exe.win-amd64-3.11\lib\li
brary.zip\Dino\Spritesheet.png'.
Код: Выделить всё
import cx_Freeze
import os
executables = [
cx_Freeze.Executable(
script="DinoGame.py",
base="Win32GUI"
)
]
build_exe_options = {
"packages": ["pygame", "os", "random"],
"include_files": [
(os.path.join(os.getcwd(), "Dino"), "Dino"),
(os.path.join(os.getcwd(), "Musicas"), "Musicas")
],
}
cx_Freeze.setup(
name="DinoGame",
version="1.0",
description="Jogo Dino feito por Gustavo Carvalho",
options={"build_exe": build_exe_options},
executables=executables
)
Подробнее здесь: https://stackoverflow.com/questions/790 ... is-problem