如何在数据库上安装Tesseract OCR数据库、如何在、OCR、Tesseract

由网友(男人最有魅力的一个特征是有风度)分享简介:我正尝试在一台Datarick Python笔记本电脑上运行以下脚本:pip install presidio-image-redactorpip install pytesseractpython -m spacy download en_core_web_lgfrom PIL import Imagefro...

我正尝试在一台Datarick Python笔记本电脑上运行以下脚本:

pip install presidio-image-redactor
pip install pytesseract
python -m spacy download en_core_web_lg

from PIL import Image
from presidio_image_redactor import ImageRedactorEngine
import pytesseract

image = Image.open("images/ImageData.PNG")

engine = ImageRedactorEngine()

redacted_image = engine.redact(image, (255, 192, 203))

运行最后一行时,我收到以下错误:

tesseract ocr的安装及使用

TesseractNotFoundError:未安装Tesseract或它不在您的路径中。

我是否遗漏了什么?

推荐答案

您可以在单独的单元格中使用%sh在驱动程序节点上执行外壳命令。要安装tesseract,您可以执行以下操作:

%sh apt-get -f -y install tesseract-ocr 

如果您需要将其安装到集群的所有节点上,则需要使用带有相同命令的cluster init script(不带%sh)

阅读全文

相关推荐

最新文章