I'm trying:
Django-admin startproject myweb
This is what i see:
'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable
Even i added python27/Scripts to my pc environment variables but didn't work
首先,您需要先运行pip install django
而不激活虚拟环境,如果您只想在虚拟环境中安装 django 那么您必须先激活它,然后只有在触发命令django-admin startproject myweb
后才能将 django 安装到其中
py -m pip install --user virtualenv
py -m venv env
.\env\Scripts\activate
python -m pip install Django
check version:
python -m django --version
start project Command:
django-admin startproject mysite
start app Command:
python manage.py startapp myapp
now you can run project:
python manage.py runserver
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.