我正试图在python中第一次读取.pdf文件,这个文件中有OCR。
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")
我已按照this post中的指示下载了扩展名为.whl的PythonMagick文件 但我仍然得到错误ModuleNotFoundError:没有名为'PythonMagick'的模块
应该遵循的步骤和步骤,以便能够在python中读取OCR PDF。 任何建议表示赞赏。 感谢
答案 0 :(得分:0)
.whl
不是您要下载的文件。安装pip
工具并使用pip install PythonMagick
命令。如果您使用Windows,安装pip有点复杂。