已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve

已解决(paddleocr库安装报错) error: subprocess-exited-with-error
× Running setup.py install for python-Levenshtein did not run successfully.
× Encountered error while trying to install package.
╰─> python-Levenshtein
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.





文章目录

  • 报错代码
  • 报错翻译
  • 报错原因
  • 解决方法




报错代码


粉丝群里一个小伙伴想用pip安装paddleocr的时候出现的错误:

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第1张图片


已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第2张图片

报错信息

error: subprocess-exited-with-error
× Running setup.py install for python-Levenshtein did not run successfully.

× Encountered error while trying to install package.
╰─> python-Levenshtein
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.



报错翻译


报错信息翻译

错误:子进程因错误退出
正在运行安装程序。python Levenshtein的py安装未成功运行。

× 尝试安装程序包时遇到错误。
╰─>python-Levenshtein

注:这是上述软件包的问题,而不是pip。

提示:有关故障的输出,请参见上文。



报错原因


报错原因:安装paddleocr还需要安装下载其他的对应文件



解决方法


1. 下载对应python_Levenshtein版本的whl文件:https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

注:这里cp指的是python的版本,我使用的python版本是3.8这个版本,下载过高版本会导致报错

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第3张图片

2. 将下载好的whl文件放在你想要保存的目录下


已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第4张图片

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第5张图片

3. 用pip安装whl文件pip install python_Levenshtein-0.12.2-cp38-cp38-win_amd64.whl

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第6张图片

4. 上述命令,都成功之后,接下来就是最后一步,我们再一次安装paddleocr,在终端输入命令:

pip install paddleocr

5. 出现版本表明安装成功了

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第7张图片

6. 在看下导包并没有问题

已解决(paddleocr库安装报错) error: subprocess-exited-with-error × Running setup.py install for python-Leve_第8张图片

你可能感兴趣的:(《告别Bug》,python,开发语言,深度学习,图像处理)