无法加载模块pytesseract

问题描述 投票:0回答:1

我正在尝试从图像中捕获文本文件,我指的是此链接https://www.simplifiedpython.net/how-to-extract-text-from-image-in-python/

到目前为止,我已经使用此命令完成了pytesseract和图像库的安装:

pip install Image
pip install pytesseract

已经下载并安装PIL-1.1.7.win32-py2.7.exe

我现在尝试在脚本上运行它,但仍然出现错误:

import pytesseract
try:
    from PIL import Image
except ImportError:
    import Image

这是我的错误:

ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: DLL load failed: %1 is not a valid Win32 application.

任何人都知道我现在是否缺少任何先决条件。 TIA

python-2.7 python-tesseract
1个回答
0
投票

我只是重新安装了numpy并解决了错误。

© www.soinside.com 2019 - 2024. All rights reserved.