Pytesseract No such file or directory error

前端 未结 4 874
遇见更好的自我
遇见更好的自我 2021-01-18 22:46

First of all I did everything mentioned here pytesseract-no such file or directory error

Still doesn\'t work. Now I\'m using Pycharm IDE with following code:

<
相关标签:
4条回答
  • 2021-01-18 23:16

    maybe you need install tesseract ,if your os is centos, please enter

    yum install tesseract
    
    0 讨论(0)
  • 2021-01-18 23:21

    I've used the following command and it worked for me:

    brew install tesseract
    
    0 讨论(0)
  • 2021-01-18 23:22

    I tested the code you mentioned in your question. It works fine. I was facing the same error

    No such file or directory found

    The problem was the directory containing 'tesseract.exe' was not added to the environment Variable. You should be able to run command 'tesseract' in command prompt.

    if tesseract is not installed you can download it from tesseract 1: https://github.com/tesseract-ocr/tesseract/wiki and for windows use third party installer available here

    0 讨论(0)
  • 2021-01-18 23:22

    I solved my own question.

    im = Image.open('test.png')
    print pytesseract.image_to_string(im)
    

    It's still unclear why it works when a reference is passed but not directly when I try to open image inside the parameter.

    0 讨论(0)
提交回复
热议问题