本文主要是介绍<Python><报错>python安装paddleocr时报错“no module patch_ng”如何解决?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
前言
python安装paddleocr时报错“no module patch_ng”的解决办法。
错误信息
在使用python安装paddleocr时,可能会遇到一下错误:
Collecting lmdb (from paddleocr>=2.0.1)Using cached lmdb-1.4.1.tar.gz (881 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [14 lines of output]Traceback (most recent call last):File "C:\Users\rongjv\AppData\Local\Temp\pip-install-jbuy_u9z\lmdb_c1e18797ceef4450879d581bb475caa1\setup.py", line 92, in <module>import patch_ng as patchModuleNotFoundError: No module named 'patch_ng'During handling of the above exception, another exception occurred:
提示缺少patch_ng模块,patch_ng模块可能是lmdb所需,但是在附带安装时总是不成功,这时候不用执着,先手动安装patch_ng试试:
pip install patch_ng
Collecting patch_ngDownloading patch-ng-1.17.4.tar.gz (17 kB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: patch_ngBuilding wheel for patch_ng (setup.py) ... doneCreated wheel for patch_ng: filename=patch_ng-1.17.4-py3-none-any.whl size=16101 sha256=e18a153685c4c150e3088294fa249f96c8e9d5473cd3d43aea33aef33ebc9c9cStored in directory: c:\users\rongjv\appdata\local\pip\cache\wheels\c0\ca\79\d6c49e498d31e473f26449c5aaa3ffdeb4d9d74b48407f8067
Successfully built patch_ng
Installing collected packages: patch_ng
Successfully installed patch_ng-1.17.4
可以看到,单独安装patch_ng模块成功,然后再次安装paddleocr:
Collecting lmdb (from paddleocr>=2.0.1)Using cached lmdb-1.4.1.tar.gz (881 kB)Preparing metadata (setup.py) ... done
可以成功安装了。
注:本文为错误解决记录,参考了网络上的文章,本文权作为记录,以便于以后参考,如果恰好帮助到你,那再好不过。
这篇关于<Python><报错>python安装paddleocr时报错“no module patch_ng”如何解决?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!