Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command "django-admin.py startproject mysite" not recognized

Tags:

People also ask

How do I fix Django-admin not recognized?

'django-admin' is not recognized as an internal or external command, operable program or batch file. To fix this, first close the terminal window and relaunch it with administrator privileges. Once you launch the elevated terminal window change directory to where you wish to start your Django project.

How do I use Django-admin Startproject?

To start a Django project you must use the django-admin executable that comes with Django. After you install Django, this executable should be accessible from any directory on your system (e.g. installed under /usr/bin/ , /usr/local/bin/ or the /bin/ directory of a virtualenv).

Where is Django-admin exe?

For windows, the "django-admin" you need to create a project is an .exe file not a . py file and it is present at the following location: C:\Python27\Scripts so you have to add this location to your path.


EDIT: I added the path to django-admin.py to my system path (C:\Users\me\Downloads\Django-1.5.1\django\bin) but even after this when I try to run django-admin.py startproject mysite, it asks me to pick a file to open with and even when I pick python.py, it opens in chrome for some reason. I also tried python django-admin.py startproject mysite but it says

python: can't open file django-admin.py: [Errno 2] No such file or directory

Any idea what is wrong?

I added python27 to the system path and when I open up cmd and switch to a directory (C:\Users\me\djcode) and then type in django-admin.py startproject mysite it says

django-admin.py is not recognized as an internal or external command, operable program or batch file

When I try typing the command python django-admin.py startproject mysite, it says

python: can't open file django-admin.py: [Errno 2] No such file or directory

Any idea why?

In the djangobook (http://www.djangobook.com/en/2.0/chapter02.html) it says

django-admin.py should be on your system path if you installed Django via its setup.py utility

what does this mean? how do I add django-admin.py to my system path? I am not sure where django-admin.py even is.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!