I'm trying to install Tesserocr for python

I'm not sure what the replacement for apt-get in apt-get install tesseract-ocr libtesseract-dev libleptonica-dev is in this case. I'm new to this and don't fully understand how it works.

I installed tesseract successfully, but I think (to my understanding) tesseract is a command line program. I check brew but I don't think brew has it.

  • Do I need to install pip? & pip install tesserocr and maybe one of virtualenv or pyenv
    – klanomath
    Jun 27 '17 at 3:18
  • I mean thats fine, but I think the issue here is that I don't see a way to install the requirement packages
    – B.Li
    Jun 27 '17 at 3:21

To install tesserocr's dependencies on macOS, you can use a package manager like Homebrew or macports. These install the C/C++ libraries and executables that are needed.

For either of them you need to install the base package manager the install tesseract

For Homebrew brew install tesseract

For Macports sudo port install teseract

After that you will be able to install you tesserocr wrapper using pip install without errors:

pip install tesserocr
  • it work! Just so I can understand how it works next time, brew install tesseract installs the requirement packages and pip install tesserocr installs the ocr right?
    – B.Li
    Jun 28 '17 at 7:03
  • brew installs the tesseract binaries; these are written in C++ and have to be compiled and installed on your computer. pip installs the python library that interfaces with the tesseract binaries.
    – Nate Glenn
    Apr 6 '18 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .