问题
$ python3 pytesseract.py
Traceback (most recent call last):
File "pytesseract.py", line 1, in <module>
import pytesseract
File "/usr/local/var/www/test/pytesseract.py", line 7, in <module>
code = pytesseract.image_to_string(image)
AttributeError: module 'pytesseract' has no attribute 'image_to_string'
解决
pytesseract.py 文件名与包名字重复了,随便换一个即可。