TesseractNotFoundError: D: esseract-ocr esseract.exe is not installed or it's not in your PATH. See README file for more information.
时间: 2024-04-28 16:24:06 浏览: 9
这个错误是因为Tesseract OCR引擎没有被正确安装或者路径没有添加到环境变量中。你可以尝试以下方法解决这个问题:
1. 安装Tesseract OCR引擎:
- Windows系统:从Tesseract OCR官方网站(https://github.com/UB-Mannheim/tesseract/wiki)下载Windows版本的Tesseract OCR安装程序,并按照提示进行安装。
- Linux系统:使用以下命令在终端中安装Tesseract OCR:
```
sudo apt-get install tesseract-ocr
```
2. 将Tesseract OCR引擎路径添加到环境变量中:
- 在Windows系统中,将tesseract.exe所在的路径添加到系统环境变量中。
- 在Linux系统中,可以使用以下命令将Tesseract OCR引擎路径添加到环境变量中:
```
export PATH=/usr/bin:$PATH
```
上述命令假设Tesseract OCR引擎安装在/usr/bin目录下,如果安装在其他目录下,请相应修改。
完成上述操作后,重新运行你的Python程序,应该就能够正常使用Tesseract OCR引擎了。
相关问题
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 引擎已经被正确地安装到了系统的环境变量中,你可以重新运行你的代码。如果还是不行,可以尝试重启一下你的计算机,然后再运行代码。