私はMac Maverickのpytesser(link)のこの例に従おうとしています。私は何をすべきか理解していない、image_to_stringがMacで動作しない
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pytesser.py", line 31, in image_to_string
call_tesseract(scratch_image_name, scratch_text_name_root)
File "pytesser.py", line 21, in call_tesseract
proc = subprocess.Popen(args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
しかし:
>>> from pytesser import *
>>> im = Image.open('phototest.tif')
>>> text = image_to_string(im)
はしかし、最後の行に私は、このエラーメッセージが表示されます。ファイルphototestは私がスクリプトを実行しているのと同じフォルダにあります。これを修正するには?
UPDATE:私は
brew install tesseract
をしようとすると
私はこのエラーを取得する:
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Error: You must `brew link libtiff libpng jpeg' before tesseract can be installed
スクリプトがプロセスを起動する問題を抱えているように見えます...そして、それはhttps://code.google.com/p/pytesser/wiki/で説明したのと同じ問題のように見えますREADME このディストリビューションにはWindows実行ファイルが付属していますが、これはMacでは動作しません。そこに書かれているLinuxの人々は、おそらくtessact実行可能ファイルを提供する必要があります。 – Luis
入手しました。しかし、私はこれをすることはできますか? –
私はそれが可能だと確信していますが、私は詳細を知らない:質問はtessactユーザーのためにタグ付けする必要があります。 – Luis