我一直在尝试关注https://kivy.org/doc/stable/guide/packaging-windows.html
但是我有与此程序一起使用的其他库[Watchdog / S2Protocol]。我已经使用网站上的所有基本说明对其进行了编译,但是当我在cmd中运行它时,出现以下错误:
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\test\\COMPIL~1\\dist\\SC2_GO~1\\s2protocol\\versions\\*.*'
[15264] Failed to execute script compile_test
我已经搜索了一段时间,但是找不到与此主题相关的任何内容,而且我不确定在使用PyInstaller修复此问题时如何添加依赖项。任何帮助将不胜感激。
编辑:.spec文件读取:
from kivy.deps import sdl2, glew
# -*- mode: python -*-
block_cipher = None
a = Analysis(['C:\\test\\compile_test.py'],
pathex=['C:\\test\\compile_here'],
binaries=[],
datas=[],
hiddenimports=[],
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='sc2_goal_tracker',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe, Tree('C:\\test\\'),
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
strip=False,
upx=True,
name='compile_test')