pyinstaller打包文件
修改完spec文件,# -*- mode: python ; coding: utf-8 -*-
import sys
sys.setrecursionlimit(5000)
block_cipher = None
SETUP_DIR=r'C:\\Users\\ASUS\\Desktop\\python\\feijidazhan\\test\\imgae\\'
a = Analysis(['main.py',
'wo.py',
'bag.py',
'background.py'],
pathex=['C:\\Users\\ASUS\\Desktop\\python\\feijidazhan\\test'],
binaries=[],
datas=[(SETUP_DIR+'key.png','image'),
(SETUP_DIR+'man1.png','image'),
(SETUP_DIR+'man2.png','image'),
(SETUP_DIR+'man3.png','image'),
(SETUP_DIR+'room1.png','image'),
(SETUP_DIR+'room2.png','image'),
(SETUP_DIR+'room3.png','image'),
(SETUP_DIR+'room4.png','image'),
(SETUP_DIR+'room5.png','image'),
(SETUP_DIR+'room6.png','image'),
(SETUP_DIR+'room7.png','image'),],
hiddenimports=['pygame','traceback','sys','pygame.locals'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='main')
执行完pyinstaller -D main.spec,
点击出来的exe文件报错怎么办
重装pyinstaller:
pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip 用github的镜像 本帖最后由 fytfytf 于 2020-8-6 15:36 编辑
xiaosi4081 发表于 2020-8-6 13:23
重装pyinstaller:
用github的镜像
重装完又打了一次包,点exe这个报错怎么办
fytfytf 发表于 2020-8-6 14:42
重装完又打了一次包,点exe这个报错怎么办
你不是刚发了一样的贴吗{:10_277:} 陈尚涵 发表于 2020-8-6 17:14
你不是刚发了一样的贴吗
之前网页卡住了,我以为没发出去{:10_277:} fytfytf 发表于 2020-8-7 10:50
之前网页卡住了,我以为没发出去
额
页:
[1]