天天看點

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 報錯