Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing pytesser

I'm new to python and would like to install and use the pytesser OCR library. All of the other modules that I've installed, I've used easy_install, which has worked fine. But pytesser is the first that I've had to install by hand using Google Code's .zip file.

Per the instructions in the readme (https://code.google.com/p/pytesser/wiki/README) I extracted the contexts to my C:\Python27\Scripts file. However when I try:

from pytesser import *

within the Python Shell, I get the following error:

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    from pytesser import *
ImportError: No module named pytesser

Any ideas? Windows 7. Python 2.7. My other scripts using modules such as PIL, Scrapy, Numpy have been working fine.

Thanks, Tom

like image 379
Tom M. Avatar asked Mar 22 '13 09:03

Tom M.


People also ask

Do I need to install Tesseract to use Pytesseract?

OK - one more step before we can use pytesseract, we need to figure out where our tesseract executable is installed. The tesseract executable location is needed for pytesseract to work properly.

What is the difference between Pytesseract and Tesseract?

Tesserocr is a Python wrapper around the Tesseract C++ API. Whereas Pytesseract is a wrapper for the tesseract-ocr CLI. Therefore with Tesserocr you can load the model at the beginning or your program, and run the model separately (for example in loops to process videos).


1 Answers

So I'm using w10 64 bits. And it took me some time to understand how you have to install it to be able to use it.

How to :

https://code.google.com/archive/p/pytesser/downloads

download pytesser_v0.0.1.zip

unzip

move files in the project

rename import Image to "from PIL import Image" in the pytesser.py

=== Enjoy.

like image 160
Masa Avatar answered Oct 19 '22 03:10

Masa