
paddleocr打包exe,结果执行异常问题汇总
PaddleOCR
Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
项目地址:https://gitcode.com/gh_mirrors/pa/PaddleOCR

·
1.修改.spec
2.问题
核心问题就是:ModuleNotFoundError: No module named 'framework_pb2'
找不到framework_pb2
答案:
修改image.py
然后重新用pyinstaller打包生成exe,运行发现还是报错,执行下面第2步
继续按照上面链接中提到的,将site-packages/paddle/fluid/中的proto文件夹复制到生成的dist/paddle/fluid/下
继续运行时,发现不会再提示No module named 'framework_pb2'。
3.错误:File “ppocr\utils\e2e_utils\pgnet_pp_utils.py”, line 25, in
ModuleNotFoundError: No module named 'extract_textpoint_slow’的解决方法:把ppocr文件包移到dist目录下面。
4.错误:File “skimage\feature\orb_cy.pyx”, line 13, in init skimage.feature.orb_cy
ModuleNotFoundError: No module named ‘skimage.feature._orb_descriptor_positions’
增加spec文件中的hiddenimports=[‘framework_pb2’,‘scipy.special.cython_special’,‘skimage’,‘skimage.feature._orb_descriptor_positions’],
5.最后把配置文件转到dist文件夹已经打包好路径下执行。
总结:dll文件、ppocr、配置文件、hidden-import解决!




Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
最近提交(Master分支:8 个月前 )
a80d2c89
4 天前
5d120f8f
6 天前
更多推荐
所有评论(0)