0

I am a complete code novice. I am trying to teach myself python and so far I've been able to do rudimentary scripting. I want to try and learn how to use an OCR which might be somewhat advanced for me, but I'm doing it for fun so I have all the time in the world.

I'm trying to set up pytesser and I understand I need to download both the pytesser module and a PIL. I think there is a problem with how I'm storing my files.

Right now my PIL directory is located in: C:\Python27\Lib\site-packages

and my pytesser_v0.01 directory is located in:C:\Python27\Lib\site-packages

I try to do the basic test found here

And I keep getting the following error

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

I think this is a very simple question because I keep looking to where to install my PIL and pytesser directories and every online forum/help starts by saying "install it" and not where.

Edit:

I found the correct place to install pytesser but now i'm getting the following errors. The first problem was solved by making sure that pytesser, util, errors and tesseract.exe were in the site-package file and the program didn't have to go into the pytesser folder.

>>> image = Image.open('fnord.tif')
>>> print image_to_string(image)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\pytesser.py", line 30, in   image_to_string
    util.image_to_scratch(im, scratch_image_name)
  File "C:\Python27\lib\site-packages\util.py", line 7, in image_to_scratch
im.save(scratch_image_name, dpi=(200,200))
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 1433, in save
    fp = __builtin__.open(fp, "wb")
IOError: [Errno 13] Permission denied: 'temp.bmp' 
S.Slusky
  • 232
  • 4
  • 12

0 Answers0