Python版本3.9,Nuitka版本1.8.6,paddleocr版本2.6.1.3,paddlepaddle版本2.5.2

Nuitka打包后提示报错

File "C:\Users\Administrator\Desktop\XXX\XXX\test.dist\os.py", line 1111, in add_dll_directory
FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'C:\\Users\\Administrator\\Desktop\\XXX\\XXX\\test.dist\\paddle\\fluid\\..\\libs'

把Paddle复制到文件夹内,继续报错

File "D:\XXX\XXX.dist\paddle\fluid\core.py", line 376, in set_paddle_lib_path
lib_dir = os.path.sep.join([site.USER_SITE, 'paddle', 'libs'])
TypeError: sequence item 0: expected str instance, NoneType found

解决方案:

你的python路径\Lib\site-packages\paddle\fluid\core.py,大概380行

if hasattr(site, 'USER_SITE')

改为

if hasattr(site, 'USER_SITE') and site.USER_SITE: 

然后重新打包就可以了

GitHub 加速计划 / pa / PaddleOCR
44
11
下载
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分支:4 个月前 )
0697d248 2 天前
04c989b7 5 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐