pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
时间: 2023-11-16 16:37:15 浏览: 1
这个错误提示是由于你没有安装 Tesseract OCR 或者安装了但它没有在你的系统环境变量 PATH 中。你需要按照 README 文件中的说明安装 Tesseract OCR,并且将其添加到你的系统环境变量 PATH 中。安装完成后,你应该能够使用 pytesseract 库来识别图片中的文本了。
相关问题
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 引擎已经被正确地安装到了系统的环境变量中,你可以重新运行你的代码。如果还是不行,可以尝试重启一下你的计算机,然后再运行代码。