๋ฐ์ํ
์๊พธ๋ง ์ด๋ฐ๋ฅ์ ์๋ฌ๊ฐ ๋ฌ๋ค๋ฉด,
ImportError: cannot import name 'image' from 'PIL'
# ์ฝ๋ฉ๊ณผ ๊ฐ์ ์ํฉ์์ PIL ๋ ์ ์ ํจ
from PIL import image
ํด๊ฒฐ๋ฐฉ๋ฒ 1
!pip install --no-index -f https://dist.plone.org/thirdparty/ -U PIL
!pip install Pillow
!pip install --upgrade --force-reinstall pillow
๋ชจ๋ ์ฅฌํผํฐ ๋ ธํธ๋ถ ์ํ์์ ์คํํ๋ค๋ ๊ฐ์ ์ด๋ค
ํด๊ฒฐ๋ฐฉ๋ฒ 2
stackoverflow์ ๋์์๋ ๋ด์ฉ์ด์ง๋ง,
For me, I had typed image with a lower case "i" instead of Image. So I did:
from PIL import Image NOT from PIL import image
๋ณด๋ฉด Image ๋ชจ๋์ ๋ถ๋ฌ์ฌ๋, ๋๋ฌธ์๊ฐ ์๋ ์๋ฌธ์๋ก ์ธํด์ ์๊ธธ ์ ์๋ ์๋ฌ์ผ์๋ ์๋ค
๋
๋ฐ์ํ
'๐๏ธ์ํํธ์จ์ด > ๐ปpython' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[github code]๊นํ๋ธ ํ์ผ ๋ค์ด๋ฐฉ๋ฒ (0) | 2021.11.16 |
---|---|
๋ฅ๋ฌ๋ ๊ฐ์ 1ํธ(VScode ์ฃผํผํฐ ํ๊ฒฝ ์ค์ , tensorflow) (0) | 2021.11.16 |
No module named 'cv2' ์๋ฌ ํด๊ฒฐ๋ฐฉ๋ฒ (0) | 2021.11.13 |
tf,idf ๋ฐฉ์ (0) | 2021.11.12 |
[ML] 5๋ถ์์ ๋จธ์ ๋ฌ๋ ๋ฟ์๊ธฐ (feat.breast cancer) (0) | 2021.11.05 |