pytesseract模块使用出现错误:tesseract is not installed or it's not in your path

windows下使用pytesseract模块进行文本识别出现错误如下:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path

解决:代码中加入如下行:pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" (引号中是tesseract.exe的路径,如果未安装,请参照以下步骤)


tesseract安装步骤:

  1. 下载相关文件:tesseract-ocr下载地址:https://github.com/tesseract-ocr/tesseract/wiki

  2. 安装上述下载文件

  3. 如果需要识别其他语言,可以下载相关语言的 .traineddata文件(下载地址:https://github.com/tesseract-ocr/tesseract/wiki/Data-Files)。将 .traineddata文件复制到 **\Tesseract-OCR\tessdata路径下。

你可能感兴趣的:(软件安装,Python)