- pytesseract的pypi网址
- 如果直接安装使用会报错:
- ocr图片:
- 简易使用:
pip3 install pytesseract
import pytesseract from PIL import Image print(pytesseract.image_to_string(Image.open('1.png')))
- 报错如下:
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- ocr图片:
- 需要安装Google’s Tesseract-OCR Engine
- To install Tesseract 4.x you can simply run the following command on your Ubuntu 18.xx bionic:
sudo apt install tesseract-ocr
- To install Tesseract 4.x you can simply run the following command on your Ubuntu 18.xx bionic:
- 正确结果:
[Python OCR] pytesseract 的正确使用方式(报错 TesseractNotFoundError)
最新推荐文章于 2023-03-24 21:52:40 发布