pycharm安装pytesseract报错Non-zero exit code (1)

pycharm安装pytesseract报错Non-zero exit code (1)

pycharm安装pytesseract报错Non-zero exit code (1)

解决:更新pip,命令如下:python -m pip install --upgrade pip

更新后安装仍然报错:

pycharm安装pytesseract报错Non-zero exit code (1)

解决:参考博客:https://zhidao.baidu.com/question/1738175020509032387.html

由于pip 10版本中没有main(),如果在不降级的情况下,修改这个文件pycharm安装目录下的helpers目录下的packaging_tool.py文件

G:\pycharm\PyCharm Community Edition 2017.1.1\helpers\packaging_tool.py

pycharm安装pytesseract报错Non-zero exit code (1)

在头部加上

1

import pip._internal as pip_new

然后分别修改文件中的这两行中的pip

1

2

return pip.main(['install'+ pkgs)

return pip.main(['uninstall''-y'+ pkgs)

1

2

return pip_new.main(['install'+ pkgs)

return pip_new.main(['uninstall''-y'+ pkgs)

在安装pytesseract即可。

安装pytesseract时,同时安装pillow,所以我们只需安装pytesseract即可。

pycharm安装pytesseract报错Non-zero exit code (1)

上一篇:爬虫常见错误及解决方法


下一篇:PackagesNotFoundError: The following packages are not available from current channels