다음 질문에 답을 시도했지만 제대로 작동하지 않았습니다. Kivy: compiling to a single executable 내가 할 첫 번째 명령은 그렇게kivy 파일을 실행 파일로 만들기
# -*- mode: python -*-
from kivy.deps import sdl2, glew
block_cipher = None
a = Analysis(['C:/Users/Karl/Documents/aaaSpaceCRAFT/launcher/main.py'],
pathex=['C:\\Users\\Karl\\Documents\\aaaSpaceCRAFT\\launcher'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['_tkinter', 'Tkinter', 'enchant', 'twisted'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
a.datas += [('launcher.kv', 'C:/Users/Karl/Documents/aaaSpaceCRAFT/launcher/launcher.kv', 'DATA')]
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='launcher',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=False)
처럼 보인다 그리고 나서 다음 명령을 실행할 수 있도록
pyinstaller --onefile -y --clean --windowed --name launcher --exclude-module _tkinter --exclude-module Tkinter --exclude-module enchant --exclude-module twisted C:/Users/Karl/Documents/aaaSpaceCRAFT/launcher/main.py
가 그럼 난 사양 파일을 편집이다 python -m PyInstaller myapp.spec
하지만 난을 실행하려고 할 때마다 exe는 열리고 즉시 닫힙니다. 나는 커맨드 라인을 통해 그것을 실행하고 오류가 주어지지 않는다.
도움을 주시면 감사하겠습니다.
'console = False '를'console = True'로 변경하고 pyinstaller를 다시 실행하십시오. 그런 다음 앱에서 생성 한 결과를 확인합니다. –