用老師的方法,新建不了應(yīng)用!怎么辦???
(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$?
2019-07-03
base指的是anaconda里面的第一個(gè)環(huán)境(venv),如果你本機(jī)需要的是另一個(gè)python環(huán)境,那么你應(yīng)該直接打開(kāi)終端使用,如果在base環(huán)境里面安裝了django,那顯示base就是沒(méi)錯(cuò)的,你這個(gè)錯(cuò)誤可能是在安裝anaconda的時(shí)候沒(méi)有勾選添加到系統(tǒng)環(huán)境變量
2019-07-02
自從安裝了anaconda之后,終端就出現(xiàn)了一個(gè)(base),之前可以正常使用django的。怎么辦