【发布时间】:2021-05-17 18:31:36
【问题描述】:
跑步
from PIL import Image
import pytesseract as pt
text = pt.image_to_string(Image.open("text.png"))
给我
Traceback (most recent call last):
File "C:\Users\Rasmus\workspace\PythonMTGO\src\OCR.py", line 1, in <module>
from PIL import Image
File "C:\Users\Rasmus\AppData\Local\Programs\Python\Python35\lib\site-packages\PIL\Image.py", line 66, in <module>
from PIL import _imaging as core
ImportError: cannot import name '_imaging'
我从 https://pypi.python.org/pypi/Pillow/3.0.0 为 python 3.5 安装了枕头
我看了一个回答说 PIL 和枕头不能一起工作?但是,如果我使用 windows msi 安装程序从上面的链接安装,它将安装 PIL 和枕头并将其放入 C:\Users\Rasmus\AppData\Local\Programs\Python\Python35\Lib\site-packages
我花了一整天的时间来编写 3 行代码。希望任何人都知道可能出了什么问题。
【问题讨论】:
标签: python