如何解决 Tesseract Not Found 错误,Anaconda?
How to solve Tesseract Not Found Error, Anaconda?
所以我的 conda 版本是 4.8.3 我刚开始安装 tesseract 和 anaconda。使用以下命令安装 tesseract:
`conda install -c conda-forge pytesseract`
`conda install -c conda-forge/label/cf202003 pytesseract `
现在,当我尝试 运行 将简单图像转换为 ocr 代码时,出现以下错误
File "C:\Users\user\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 232, in
run_tesseract 提高 TesseractNotFoundError()
TesseractNotFoundError: tesseract is not installed or it's not in your path
您看到此错误是因为您的 PATH 中没有 tesseract 可执行文件。所以你必须包括以下行:
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
您可以在 pytesseract 的 Official documentation 中查看示例。
我写了default tesseract 可执行文件夹,但是如果你改变了它,记得使用<full_path_to_your_tesseract_executable>
(如前link ).
所以我的 conda 版本是 4.8.3 我刚开始安装 tesseract 和 anaconda。使用以下命令安装 tesseract:
`conda install -c conda-forge pytesseract`
`conda install -c conda-forge/label/cf202003 pytesseract `
现在,当我尝试 运行 将简单图像转换为 ocr 代码时,出现以下错误
File "C:\Users\user\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 232, in
run_tesseract 提高 TesseractNotFoundError()
TesseractNotFoundError: tesseract is not installed or it's not in your path
您看到此错误是因为您的 PATH 中没有 tesseract 可执行文件。所以你必须包括以下行:
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
您可以在 pytesseract 的 Official documentation 中查看示例。
我写了default tesseract 可执行文件夹,但是如果你改变了它,记得使用<full_path_to_your_tesseract_executable>
(如前link ).