0

I'm trying to read a .pdf file for the first time in python, This file has OCR in it.

from wand.image import Image
from PIL import Image as PI
#import pyocrfrom PythonMagick import Image
from PythonMagick import Image
import pyocr.builders
import io

im = Image()
im.read(r"D:/test.pdf")

I have downloaded PythonMagick file which has .whl extension, as directed in this post But still I get error ModuleNotFoundError: No module named 'PythonMagick'

How and what step should be followed so that I could be able to read the OCR PDF in python. Any suggestions are appreciated. Thanks

Andre_k
  • 1,680
  • 3
  • 18
  • 41

1 Answers1

0

.whl is not the file you meant do download. Install pip tools and use pip install PythonMagick command. Installing pip is a little bit complicated if you are using Windows.

  • This gives error "C:\Users\Admin1>pip install PythonMagick Collecting PythonMagick Could not find a version that satisfies the requirement PythonMagick (from ver sions: ) No matching distribution found for PythonMagick" – Andre_k Sep 19 '17 at 11:43
  • Make sure you are using python2 and it's pip. Not the python3 one. – Marcin Kolenda Sep 19 '17 at 11:54
  • I'm executing the command from command prompt "python -m pip install PythonMagick"... but still gives error " Could not find a version that satisfies the requirement PythonMagick (from ver sions: ) No matching distribution found for PythonMagick" – Andre_k Sep 19 '17 at 12:17