小编tim*_*ika的帖子

尽管安装了 PIP,Python Pillow(或 PIL)仍无法工作

我正在关注文档:https://pillow.readthedocs.io/en/stable/

我用 pip 成功安装了 Pillow。但是,当我尝试导入该Image函数时,我可以:

a) 只从 PIL 导入 b) 只得到没有模块的错误PIL c) 得到没有模块的错误Pillow

这是消息(当我尝试使用 Pillow 而不是 PIL 时,会发生同样的情况):

from PIL import Image
ModuleNotFoundError: No module named 'PIL'
Run Code Online (Sandbox Code Playgroud)

这是我用 pip 安装它的证据:

Requirement already satisfied: Pillow in c:\python310\lib\site-packages (8.4.0)
Run Code Online (Sandbox Code Playgroud)

我在 Stackoverflow 上读到 PIL 不再维护。但是,没有任何问题回答了我的问题: ImportError:没有名为 PIL 的模块

python python-imaging-library

3
推荐指数
1
解决办法
4487
查看次数

标签 统计

python ×1

python-imaging-library ×1