Reputation: 1
I'm trying to use the django-admin but sadly its not working correctly and I must use python -m django
how can i fix it
the commandline exception that it gives:
django-admin : The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ django-admin version
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (django-admin:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Upvotes: 0
Views: 4922
Reputation: 11
Use virtual env for working with python and Django projects, you can install it from this site. After activating the virtual env, install Django and run it:
python -m pip install Django
django-admin startproject mysite
Go to the site directory and run the app:
py manage.py run server.
From here you can read the official docs and follow the tutorial.
Upvotes: 1
Reputation: 37
I had the same problem in Arch. The way to fix it is to install the package as a root sudo pip install django
.
Upvotes: 0