|
本帖最后由 pygamer 于 2022-6-27 23:07 编辑
win7 32位python38-32/ pyinstaller 5.1打包
另外打包的EXE文件运行报错提示如下:
WARNING: Hidden import "pkg_resources.py2_warn" not found!
WARNING: Hidden import "pkg_resources.markers" not found!
zombiebackground.exe.notanexecutable
打包生的.spec文件
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(
['zombiebackground.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[''],
hookspath=[],
hooksconfig={},
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,
a.binaries,
a.zipfiles,
a.datas,
[],
name='zombiebackground',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
c**ole=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
***************************************
看网络上的贴子有人说在上面这行代码里加上如下方式:
hiddenimports=['pkg_resources.py2_warn','pkg_resources.markers'],
再打包还是报一样的错,为什么?
WARNING: Hidden import "pkg_resources.py2_warn" not found!
WARNING: Hidden import "pkg_resources.markers" not found!
zombiebackground.exe.notanexecutable
请大神们支个招如何解决?小弟在此谢谢了
|
-
打包报有木马
-
没打包可以正常运行
|