tesseract is not installed or it's not in your PATH.
时间: 2024-06-09 18:08:12 浏览: 262
报错:pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path
The error message indicates that the Tesseract OCR engine is either not installed on your system or it is not in your system's PATH environment variable, which is used to locate executable files.
To fix this issue, you can try the following steps:
1. Install Tesseract OCR engine on your system. You can download it from the official website: https://github.com/tesseract-ocr/tesseract
2. Add the path to the Tesseract executable file to your system's PATH environment variable. The exact steps to do this depend on your operating system. Here are some general instructions:
- Windows:
- Open the Start menu and search for "Environment Variables".
- Click "Edit the system environment variables".
- Click the "Environment Variables" button.
- Under "System variables", find the "Path" variable and click "Edit".
- Add the path to the Tesseract executable file (e.g. C:\Program Files\Tesseract-OCR\) to the list of paths, separated by a semicolon (;).
- Click "OK" to save the changes.
- Linux and macOS:
- Open a terminal window.
- Type "export PATH=$PATH:/path/to/tesseract" (replace "/path/to/tesseract" with the actual path to the Tesseract executable file).
- Press Enter.
After adding the path to the Tesseract executable file to the PATH environment variable, restart your terminal or command prompt and try running your OCR program again.
阅读全文