raise TesseractNotFoundError() pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
时间: 2023-08-20 21:03:54 浏览: 35
这个错误通常是由于系统中没有安装Tesseract OCR库或者Tesseract OCR库的可执行文件路径没有被添加到系统的环境变量中导致的。
如果您没有安装Tesseract OCR库,请先下载并安装。您可以从Tesseract OCR的官方网站(https://github.com/tesseract-ocr/tesseract)或者使用以下命令来安装:
```
pip install pytesseract
```
安装完成后,您需要将Tesseract OCR的可执行文件路径添加到系统的环境变量中,以便Python可以找到Tesseract OCR的执行文件。具体操作可以参考Tesseract OCR的安装指南,或者参考以下步骤:
1. 打开系统的环境变量设置界面。
2. 找到系统的Path变量。
3. 点击编辑按钮,在变量值中添加Tesseract OCR的可执行文件路径,例如"C:\Program Files\Tesseract-OCR"。
4. 点击确定按钮保存设置。
完成以上步骤后,重新运行程序即可解决问题。
相关问题
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information
As an AI language model, I do not have access to your system's PATH variables or installed software. However, this error message indicates that Tesseract OCR is not installed or cannot be found in your system's PATH.
To resolve this issue, you can try the following steps:
1. Install Tesseract OCR on your system. You can download it from the official website: https://github.com/tesseract-ocr/tesseract
2. Add the Tesseract OCR installation directory to your system's PATH variable. This will allow your system to find the Tesseract OCR executable file when it is called by pytesseract.
3. Restart your system or open a new terminal session to ensure that the PATH variable is updated.
If you have already installed Tesseract OCR and added it to your PATH, make sure that you have spelled the executable file name correctly in your code. Also, check that the version of pytesseract you are using is compatible with the version of Tesseract OCR installed on your system.
进行了pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.报错
如果出现 `pytesseract.pytesseract.TesseractNotFoundError` 报错,那么可能是因为你没有安装 Tesseract OCR 引擎,或者 Tesseract OCR 引擎没有被正确地安装到系统的环境变量中。
你可以先尝试安装 Tesseract OCR 引擎,可以使用以下命令进行安装:
```python
!sudo apt update
!sudo apt install tesseract-ocr
```
如果你使用的是 Windows 系统,可以从 Tesseract OCR 官方网站下载安装包进行安装。
安装完成后,你可以检查 Tesseract OCR 引擎是否在系统的环境变量中。在终端或命令提示符中输入以下命令:
```python
tesseract --version
```
如果能够正确输出 Tesseract OCR 引擎的版本信息,那么说明 Tesseract OCR 引擎已经被正确地安装到了系统的环境变量中,你可以重新运行你的代码。如果还是不行,可以尝试重启一下你的计算机,然后再运行代码。