python 打包easyocr后运行exe报错提示没有‘ch_sim_char.txt’

python 打包easyocr后运行exe报错提示没有‘ch_sim_char.txt’_第1张图片

报错原因:提示‘ch_sim_char.txt’不存在,说明打包的时候并没有把这个包打进去,在打包后运行时,程序去这个地方找不到‘ch_sim_char.txt’:C:\Users\issuser\AppData\Local\Temp\_MEI162162\easyocr\character\
没打包进去的原因也是因为打包的时候去这个地方找不到‘ch_sim_char.txt’:C:\Users\issuser\AppData\Local\Temp\_MEI162162\easyocr\character\
为什么easyocr明明在Python安装目录,pyinstaller还要去C盘去找呢?
可能之前有更改pip install 的安装路径,更换新路径之后,老路径还在。
但是为什么打包的时候还要去老路径找东西就不清楚了。
解决办法:
1、 删除原来老路径中关于_MEI开头的文件夹

python 打包easyocr后运行exe报错提示没有‘ch_sim_char.txt’_第2张图片
2、卸掉easyocr : pip uninstall easyocr
3、进入目前easyocr所在的文件夹,将easyocr文件夹整个删除掉
4、重新pip安装easyocr

你可能感兴趣的:(python)