0

When I am trying to install pytesseract in anaconda prompt. It says "package already installed". But when I run command "import pytesseract " error show "module is not found"

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
BhuriStray
  • 87
  • 1
  • 12

1 Answers1

0

Did you install PIL/pillow alongside pytesseract? According to this webpage, PIL is required for pytesseract to work.

To install PIL (assuming you configured python normally when you installed it), open up command prompt as administrator and type: "python -m pip install pillow" (without quotes)

If you already have PIL installed:

Is the pytesseract module in the same directory/folder as the python.exe interpreter you are using? If not, is it in the same directory/folder as the program you are trying to import it into?

You should either:

  • Drag a copy of pytesseract into the same folder as the python.exe interpreter you are using (your best bet)

  • Drag a copy of pytesseract into your program directory (probably your next best option)

    or

  • Follow the instructions provided in one of the answers in this thread to import pytesseract from a remote directory (not ideal).

If my answer doesn't work for you, leave a comment and I can try and help further.

Cheers!

Community
  • 1
  • 1
g_kub
  • 74
  • 7
  • thanks for your support. But i have already installed pillow. but idle is showing same error. – BhuriStray Jul 16 '18 at 12:22
  • File "C:\Users\dell\Anaconda3\lib\site-packages\PIL\Image.py", line 60, in from . import _imaging as core ImportError: DLL load failed: The specified module could not be found. **this error comes after importing pytesseract** – BhuriStray Jul 16 '18 at 12:24
  • It looks like you are trying to import the PIL (and probably pytesseract) module from the directory "C:\Users\dell\Anaconda3\lib\site-packages\". What version of Python are you using? This directory will change slightly depending on your username and current Python version, but your modules are more likely located in the directory: "C:\Users\(your username)\AppData\Local\Programs\Python\Python37" ("Python37" might be 36, 35, etc... depending on your python version. – g_kub Jul 16 '18 at 22:10
  • Thanks, But i resolve the issue by uninstalling the pytesseract and again install with the help of pip – BhuriStray Jul 17 '18 at 06:52