簡體   English   中英

如何在anaconda上為python安裝tesseract

[英]How to install tesseract for python on anaconda

有誰知道如何在 Anaconda 上為 python 安裝 tesseract? 我有一個windows系統。 anaconda 網站提供了 linux 系統的安裝:

conda install -c auto pytesseract 

Windows 系統是否需要進行任何更改?

🚀 工作解決方案(👨‍🔬 於 2019 年 6 月測試)

  • 🕵️‍♂️我已經在anaconda cloud上搜索過了
  • 🌟 下載次數最多的版本(win64)安裝命令:
conda install -c mcs07 tesseract
conda install -c jim-hart pytesseract

剛剛嘗試進行 pip install ,它似乎奏效了!

pip install pytesseract 

要在 Windows 上使用 conda 安裝此軟件包,請運行以下操作之一:

conda install -c simonflueckiger tesserocr 
conda install -c simonflueckiger/label/tesseract-4.0.0-master tesserocr 
conda install -c simonflueckiger/label/tesseract-3.5.1 tesserocr

對於那些想在 MacBook/OSX 上安裝 tesseract 的人,請使用 conda-forge 頻道:

conda install -c conda-forge tesseract

要通過 pytesseract 導入它,您還必須安裝 pytesseract:

conda install -c conda-forge pytesseract

並像這樣使用它:

import pytesseract
import cv2 # For loading image

img = cv2.imread('read_my_doc_image.jpg')
text = pytesseract.image_to_string(
    img, config='-l eng --oem 1 --psm 6'
)
print(text)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM