导入错误:无法从“pytesseract”(未知位置)导入名称“image_to_string”

时间:2021-02-01 19:00:32

标签: tesseract python-tesseract

我通过自制软件安装了 tesseract,并且在 VS Code 中使用了一个名为 Virtualenv 的虚拟环境。

运行代码(Python)时的错误是这样的:

导入错误:无法从“pytesseract”(未知位置)导入名称“image_to_string”

有什么可以帮助我的想法吗?

按照下面的python代码操作。

from pytesseract import image_to_string
from PIL import Image
import PIL
import pytesseract

print(image_to_string(Image.open('base-image/ocr.png')))

0 个答案:

没有答案