1
我嘗試使用Pyinstaller創建.exe
。我需要包含一個名爲hook-mpl_toolkits.basemap
的鉤子。我加了鉤在.spec
文件如下:未找到Hook目錄
# -*- mode: python -*-
block_cipher = None
a = Analysis(['xxx.py'],
pathex=['C:\\...\\...\\xxx'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=['C:\\...\\...\\hooks\\hook-mpl_toolkits.basemap.py'],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='map',
debug=False,
strip=False,
upx=True,
console=True)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='map')
但是當我運行 「Pyinstaller xxx.spec
」,我收到一個錯誤:
Hook directory not found
安建議?