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
'리눅스' 카테고리의 다른 글
| [draft] 파일 인코딩 변경하기 (0) | 2025.12.12 |
|---|---|
| [draft] 리눅스에서 파일명에 날짜를 포함시키는 방법 (0) | 2025.12.12 |
| [draft] 자체 서명된 SSL 인증서를 생성 (1) | 2025.12.09 |
| [draft] 리눅스에서 라우팅을 추가하는 방법 (0) | 2025.12.09 |
| [draft] 우분투에서 저장소를 Kakao Mirror 공식 사이트로 변경하는 방법 (0) | 2025.12.09 |