9

Does anyone know how to install tesseract for python on Anaconda? I have a windows system. The anaconda website gives the installation for a linux system:

conda install -c auto pytesseract 

Would there be any alterations required for a windows system?

VK1
  • 180
  • 1
  • 1
  • 9
  • Possible duplicate of [PackagesNotFoundError: The following packages are not available from current channels:](https://stackoverflow.com/questions/48493505/packagesnotfounderror-the-following-packages-are-not-available-from-current-cha) – mpour Mar 13 '18 at 12:54

4 Answers4

9

Working Solution (‍ tested at Jun 2019)

  • ️‍♂️ I have searched it on anaconda cloud
  • Most downloaded version (for win64) install command:
conda install -c mcs07 tesseract
conda install -c jim-hart pytesseract
yEmreAk.com
  • 3,278
  • 2
  • 18
  • 37
6

Just tried doing a pip install and it seems to have worked!

pip install pytesseract 
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
VK1
  • 180
  • 1
  • 1
  • 9
6

For those who want to install tesseract on MacBook/OSX, use conda-forge channel:

conda install -c conda-forge tesseract

To import it via pytesseract you will have to install pytesseract as well:

conda install -c conda-forge pytesseract

And use it like:

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)
Knight Forked
  • 1,529
  • 12
  • 14
2

To install this package with conda on Windows run one of the following:

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
Sahil Rajput
  • 135
  • 1
  • 5