pytesseract 使用

安裝:pytesseract

sudo pip3 install -U git+https://github.com/madmaze/pytesseract

ubuntu報錯:

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

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

報錯:

pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/share/tesseract-ocr/4.00/tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'chi_sim\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')
 

將文件 :

下載:chi_sim.traineddata 文件考進 /usr/share/tesseract-ocr/4.00/tessdata/ 文件夾中.

chi_sim.traineddata這個文件上傳不上去 ,自己找吧

發佈了110 篇原創文章 · 獲贊 46 · 訪問量 15萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章