[英]starting a django server with cmd
我為 django 創建了一個虛擬環境,我試圖啟動服務器,但我一直遇到這個問題
(Django-8VqULu7_) C:\Users\rondo11\Documents\learn how to program\learning python\Django>py manage.py runserver
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?
問題是什么?
pipenv shell install django
安裝 django 在虛擬環境中安裝 django
pipenv shell
運行虛擬環境
python manage.py runserver
啟動服務器
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.