pyinstaller打包一些三方库后,报资源不存在
- 在目录
site-packages\PyInstaller\hooks下新建对应文件hook-对应三方库名字.py,如hook-ngender.py - 编辑
hook-ngender.py:
from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('ngender')
site-packages\PyInstaller\hooks下新建对应文件hook-对应三方库名字.py,如hook-ngender.pyhook-ngender.py:from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('ngender')