pip install 을 사용해 설치했는데 인식하지 못할 때.

Django 프로젝트를 진행하는 중에 pip install Pillow 로 프로그램 설치를 진행 후 마이그레이션을 진행하는데

[bash]

pip install Pillow
python manage.py makemigration appname

 

아래와 같은 오류가 발생했다. 

SystemCheckError: System check identified some issues:

 

ERRORS:

posts.Post.thumbnail: (fields.E210) Cannot use ImageField because Pillow is not installed.

        HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".

 

pip 업그레이드 및 재 설치하여 해결했다.

# 1. pip 자체를 최신버전으로 업데이트
python -m pip install --upgrade pip

# 2. 혹시 모르니 Pillow 삭제
pip uninstall Pillow -y

# 3. 캐시 없이 다시 깨끗하게 설치
pip install Pillow --no-cache-dir

(한줄씩 명령어를 실행했다)

 

나는 Pillow 를 설치하면서 문제가 생겼기 때문에 Pillow 설치 확인 명령어로 확인했다.

python -c "import PIL; print('Pillow 설치 완료:', PIL.__version__)"

(정상 설치 확인)