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.
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 .
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.
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.
When that didn't work for me, I tried python -m django startproject mysite
and it worked.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With