pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed

271 阅读1分钟

概述

Ubuntu18.04,python3.9的虚拟环境下,在运行python脚本时经常报错:

pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH

检查发现,python的虚拟环境中已安装 'pytesseract', 重新安装或者升级此lib都无法解决此问题。

解决方案

ubuntu上需继续执行如下命令:

sudo apt update
sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

参考

ubuntu内使用pytesseract报错:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed