Failed to init API, possibly an invalid tessdata path: ./ ubuntu

1、问题描述

Failed to init API, possibly an invalid tessdata path: ./

2、解决方案:

添加“TESSDATA_PREFIX”到系统环境变量中,值为testdata的父路径(一般就是 Tesseract-OCR 的安装路径)亦可解决。在~/.bashrc中添加

export TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata

source ~/.bashrc

你可能感兴趣的:(计算机视觉,ubuntu,linux,运维)