- install PIL
Debian:
$ sudo apt-get install python-imaging
OS X or Other Linux:
$ sudo easy_install PIL
Other platform:
see PIL Home
- install pytesser
$ sudo apt-get install tesseract-ocr
$ sudo pip install pytesseract
- copy training_data
copy training_data/xujc.traineddata
to your/tesseract-ocr/path/tessdata/xujc.traineddata
eg. Ubuntu:
$ sudo cp ./training_data/xujc.traineddata /usr/share/tesseract-ocr/tessdata/xujc.traineddata
- run test script
$ python test.py
- pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/share/tesseract-ocr/tessdata/xujc.traineddata')
Make sure that you have copied the tessdata/xujc.traineddata
file to /usr/share/tesseract-ocr/tessdata
XujcCaptcha is available under the MIT license. See the LICENSE file for more info.