天天看点

from PIL import Image 报错

from PIL import Image 报错

选择Install package **

from PIL import Image 报错

发生错误,是因为我没有安装PIL

from PIL import Image 报错

1、Win + R , 输入cmd 进入,

输入:

pip install pillow      
pip install image      

下载完成再回到 Pycharm , Install package **,发现还是报错,接下来我们需要

2、打开File -- Settings -- Project Interpreter , 找到python.exe位置(

在cmd命令中输入:where python 可以找到:

from PIL import Image 报错

)

from PIL import Image 报错

3、 选中双击 Pillow ,会出现如下界面,选中Pillow,点击 Install Package

from PIL import Image 报错
from PIL import Image 报错

4、如3的步骤,选中并双击 image,选着image --- Install Package

from PIL import Image 报错