python-imaging-library - 我已经安装了枕头,但无法将其导入 python shell
问题描述
我查看了 30 多个不同的页面,但找不到我需要的答案。我使用的是 Windows 10,我使用的是 python 3.9.0。所以我像这样安装了 Pillow 8.1.0:
python3 -m pip install --upgrade Pillow
然后尝试使用以下命令将枕头导入外壳:
import PIL
import Pillow
import pillow
from Pillow import Image
from PIL import Image
from PIL import *
from Pillow import *
但我ModuleNotFoundError
每次都得到。
你有另一种将枕头放入蟒壳的方法吗?
感谢您提前回答。
解决方案
使用 Pillow 8.1.0 的 python 3.9 及更高版本,使用 from pil import Image。
推荐阅读
- python - awk 命令在 /bin/sh -c 下不起作用
- angular - Angular中的登录页面重新路由
- nestjs - 如何在 typeOrm 中获得我的关系 dto?
- sphinxsearch - 狮身人面像搜索:如何理解 min_prefix_len
- jquery - 如何连接 2 个与 OR 运算符相同的 jquery 函数?
- python - 使用 INSTALOADER 如何添加配置文件列表?现在我得一一写
- python - 有没有办法通过在 vscode 中输入 python 模块的名称来直接获取导入
- metamask - MetaMask 问题显示在开发人员选项的控制台中
- c++ - 将时间从 24 小时制转换为 12 小时制,反之亦然
- c++ - 局域网中的 Boost asio 握手失败