Home > database >  How solve django-admin is not recognized...?
How solve django-admin is not recognized...?

Time:07-19

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

CodePudding user response:

First, you need to run pip install django first without activating virtual env, if you want to install django only in virtual env then you have to activate it first and then get django installed into that only after trigger the command django-admin startproject myweb

CodePudding user response:

Here is the solution to your problem: You can do this using virtualenv. step by step

  • 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

http://127.0.0.1:8000/

  • Related