Giter VIP home page Giter VIP logo

Comments (12)

bozhodimitrov avatar bozhodimitrov commented on July 30, 2024 7

Your error is on this line:
pytesseract.pytesseract.tesseract_cmd = '/usr/local/Cellar/tesseract/3.05.01/'

You should point the tesseract_cmd to the exact path of the tesseract executable and not to the path of the folder where the tesseract executable is located, which is what you did.

Try this line instead:
pytesseract.pytesseract.tesseract_cmd = '/usr/local/Cellar/tesseract/3.05.01/tesseract'

Also be sure that you have the tesseract executable inside the folder.

from pytesseract.

bozhodimitrov avatar bozhodimitrov commented on July 30, 2024 6

@diyali03 You can try to issue the following command in order to locate the path of tesseract:
which tesseract

from pytesseract.

yashwanth-sai-kanakala avatar yashwanth-sai-kanakala commented on July 30, 2024 2

Please type "Which Tesseract" in the terminal which will provide the path of Tesseract executable. This resolved my error !

from pytesseract.

bozhodimitrov avatar bozhodimitrov commented on July 30, 2024 1

Please reopen if you still have the issue.

from pytesseract.

diyali03 avatar diyali03 commented on July 30, 2024

Thanks.
But the problem is that I build tesseract from Homebrew,
I check the dir and it shows that :

$  ls
AUTHORS			LICENSE			include
COPYING			NEWS			lib
ChangeLog		README.md		share
INSTALL_RECEIPT.json	bin
$ cd ..
$ ls
3.05.01
$ cd ..
$ ls
tesseract

Also, I try to set the path on:
/usr/local/Cellar/tesseract
or
/usr/local/Cellar/tesseract/3.05.01/share
But it did work.

from pytesseract.

diyali03 avatar diyali03 commented on July 30, 2024

May be I should try set the path to bin?

from pytesseract.

xxNB avatar xxNB commented on July 30, 2024

I have same problem

Traceback (most recent call last):
File "/Users/zhangxin/project/crawl/douban/douban_spider/identify.py", line 25, in
return_word()
File "/Users/zhangxin/project/crawl/douban/douban_spider/identify.py", line 22, in return_word
return pytesseract.image_to_string(binaryImage, config='-psm 7')
File "/Users/zhangxin/Desktop/py_3/lib/python3.6/site-packages/pytesseract/pytesseract.py", line 122, in image_to_string
config=config)
File "/Users/zhangxin/Desktop/py_3/lib/python3.6/site-packages/pytesseract/pytesseract.py", line 46, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in init
restore_signals, start_new_session)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

from pytesseract.

xxNB avatar xxNB commented on July 30, 2024

I solved the problem by the way you thank you

from pytesseract.

kfengc27 avatar kfengc27 commented on July 30, 2024

Thanks , I just solve this problem through your way

from pytesseract.

liujunjie11 avatar liujunjie11 commented on July 30, 2024

vi ~/.bash_profile

#tesseract
export PATH="/usr/local/Cellar/tesseract/4.0.0/bin:$PATH"

source ~/.bash_profile

tesseract_cmd = "/usr/local/Cellar/tesseract/4.0.0/bin/tesseract"

that's all!

from pytesseract.

rathdebi avatar rathdebi commented on July 30, 2024

how to check for tesseract executable in google colab. inline is my screenshot
image

from pytesseract.

snagargoje avatar snagargoje commented on July 30, 2024

Same error as above in Colab Notebook. Any help would be appreciated.

Screenshot 2021-12-17 at 5 51 42 PM

from pytesseract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.