Search code examples
pythonvisual-studioopencvtesseract

Can only run python code from separate tesseract console


I'm using visual studio to write my project and wanted to use pytesseract for image recognition so I installed it with pip. Then figured I had to download tesseract too so I did and it's available at a separate folder with a 'console' command line. The problem is that if I try running my code in visual studio it says tesseract wasn't found.

But it works fine if I run the script through tesseract's command line. Is there a more convenient way to execute my code? It seems a bit tedious to always run it from the separate command line.


Solution

  • Add tesseract folder to system PATH. It should fix problem.