반응형
python ModuleNotFoundError: No module named 'PIL'
테스트 환경
$ sw_vers
ProductName: macOS
ProductVersion: 12.5
BuildVersion: 21G72
$ python --version
Python 3.9.13
Module Not Found Error
Traceback (most recent call last):
File "/Users/.../convert_image.py", line 2, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'PIL'
pillow(PIL) 모듈 설치
pip 명령을 사용하여 pillow(PIL) 모듈 설치
pip3 install Pillow
$ pip3 install Pillow
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting Pillow
Downloading Pillow-9.2.0-cp39-cp39-macosx_11_0_arm64.whl (2.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 29.9 MB/s eta 0:00:00
Installing collected packages: Pillow
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed Pillow-9.2.0
$ pip3 list | egrep -i pillow
Pillow 9.2.0
728x90
반응형
'기타' 카테고리의 다른 글
[python] udp 소켓 통신 (0) | 2022.08.19 |
---|---|
[집체교육] DevOps를 위한 IaC 클라우드 인프라 자동화 전문가 과정 (0) | 2022.08.19 |
MBTI 성격유형검사 (0) | 2022.08.12 |
gitlab ssh를 사용하여 미러링 구성(gitlab 리포지토리 미러링) (0) | 2022.07.30 |
slack 무료 플랜 변경 사항 (0) | 2022.07.20 |