(base) JACKWONGdeMBP:django_introduction jackwong$ python manage.py startapp blog
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?
(base) JACKWONGdeMBP:django_introduction jackwong$
base指的是anaconda里面的第一个环境(venv),如果你本机需要的是另一个python环境,那么你应该直接打开终端使用,如果在base环境里面安装了django,那显示base就是没错的,你这个错误可能是在安装anaconda的时候没有勾选添加到系统环境变量
自从安装了anaconda之后,终端就出现了一个(base),之前可以正常使用django的。怎么办