from PIL import Image 报错_python

选择Install package **

from PIL import Image 报错_cmd命令_02

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

from PIL import Image 报错_python_03

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 报错_python_04

)

from PIL import Image 报错_python_05

 

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

from PIL import Image 报错_cmd命令_06

from PIL import Image 报错_python_07

 

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

from PIL import Image 报错_python_08

 

5、这时候回到界面等待完成,就不会报错了

from PIL import Image 报错_cmd命令_09

from PIL import Image 报错_cmd命令_10