python - 枕头无法导入
问题描述
我的枕头模块有问题。所以基本上我尝试了这个网站上的方法,安装它pip install Pillow
并导入它from PIL import Image
,import PIL
但它们都不起作用
如果有人帮助并感谢您的阅读,我将不胜感激。这是我的代码:
import pyautogui
import pyscreeze
from PIL import Image
lkchat = pyautogui.locateCenterOnScreen("python.png")
print ("lkchat")
我收到以下错误消息:
from PIL import Image ImportError: No module named PIL
解决方案
Kitty Star 我想建议你用枕头替换 PIL,然后安装枕头,如果你的代码没有运行,让我知道下一个错误。
推荐阅读
- c - 如何在循环中关闭和重新打开 GLUT 窗口?
- django - 为什么一个 Django 数据库查询有效,而类似的查询却没有
- angular - 这可以在非休息项目中使用 angular 2 吗?即替换thymeleaf 并保持其余项目Java 代码不变?
- qt - 什么时候必须调用 qRegisterMetaType()?
- r - 每行中第一个非 NA 和最后一个非 NA 之间的差异
- ruby-on-rails - 在 RoR 中使用 RMagick 从许多图像中生成视频
- postgresql - 如何从 WSL 连接到 windows postgres 数据库
- time - 不同乘法大小的 Fortran matmul 函数的次数
- r - 需要为交易数据生成客户 ID
- c - 为什么这个 SDL2 程序变慢了?