Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command not found: django-admin.py

I am a complete beginner to Python/Django, but I want to dive right in and start experimenting. Thus I was following this guide on installing Python/Django http://devcenter.heroku.com/articles/django.

Everything is working fine until the step

django-admin.py startproject hellodjango

Where I get

command not found: django-admin.py

Now I have tried a few things, but none have really worked out. Is there someone kind enough to point me in the right direction?

P.S. Is there a great guide out there on running Python/Django locally on a Mac to run and test apps?

I'm on Mac OS X Lion, Python 2.7.

like image 975
Simon Avatar asked Nov 23 '11 22:11

Simon


People also ask

Why Django-admin command is not working?

command not found: django-admin django-admin should be on your system path if you installed Django via pip . If it's not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django .

Where is Django-admin py located?

The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it's not on your path, you can find it in site-packages/django/bin within your Python installation.

What is Django-admin command?

django-admin is Django's command-line utility for administrative tasks. This document outlines all it can do. In addition, manage.py is automatically created in each Django project.


2 Answers

When that didn't work for me, I tried python -m django startproject mysite and it worked.

like image 105
mogwai Avatar answered Oct 04 '22 14:10

mogwai


Actually, if you use Ubuntu, it's just django-admin not django-admin.py.

Resides in /usr/bin
Probably the same thing on Mac.
You're using a Windows tutorial.

It may also tell you

python manage.py runserver 

and that is actually

python ./manage.py runserver 
like image 44
Stefan Steiger Avatar answered Oct 04 '22 16:10

Stefan Steiger