Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包缺少文件情况 FileNotFoundError: \\cache\\_MEI183882\\pkuseg\\dicts\\default.pkl' #156

Open
MoncozGC opened this issue Feb 22, 2022 · 2 comments

Comments

@MoncozGC
Copy link

使用 pyinstaller打包为可执行的exe文件,在执行exe文件时会报错。
FileNotFoundError: [Errno 2] No such file or directory: 'F:\cache\_MEI183882\pkuseg\dicts\default.pkl'
请问这是什么原因导致的呢
环境版本:
pyinstaller:4.9
python:3.8.8
pkuseg:0.0.25

@lcyyyyyyyyyyy
Copy link

lcyyyyyyyyyyy commented Feb 22, 2022 via email

@BLKSerene
Copy link

BLKSerene commented Feb 28, 2022

非.py后缀的数据文件都是要在命令行或者spec文件里手动指定的
参考:https://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-data-files
或者我的spec文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants