인프런 커뮤니티 질문&답변
python manage.py migrate 오류
작성
·
2.9K
0
django를 제대로 설치한 후 영상과 똑같이 따라하였는데 오류가 발생합니다. 파이썬과 django의 버전이 맞지 않아서 오류가 나는 것일까요?
Traceback (most recent call last):
File "manage.py", line 10, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 16, in main
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
답변 8
1
SungYong Lee
지식공유자
가상환경에 django가 깔려있지 않기 때문에 벌어지는 문제입니다. 혹은 가상환경이 아닌 곳에 장고를 설치하고 가상환경에 들어오셨을 수도 있고요.
cmder에서 이 화면을 캡쳐해주시겠어요?
cmder에서 가상환경을 올린 후 (venv/Script/activate 라고 입력 후, ) pip list를 입력한 화면을 보여주세요.
pip list라고 입력했을 때, django가 보여야 합니다.
0
0
0
0
0
0
0







