1

I've been following the tutorial on the django website and have been running into a problem regarding setting up Django: https://docs.djangoproject.com/en/dev/intro/tutorial01/

I've installed Django through their guide using setup.py, but when I run "django-admin.py startproject mysite" on the terminal, it outputs the error "-bash: django-admin.py: command not found". I've tried django-admin as per some google searches and some searches have told me to try the following commands

cd /usr/local/bin
ln -s /usr/local/django/trunk/django/bin/django-admin.py django-admin.py

but I continue to get "ln: django-admin.py: Permission denied" in that case.

I use the macports Python and was wondering if I could get any help regarding the matter. Thank you very much in advance!

SOLUTION: Thanks Doug!

After some googling I found: https://code.djangoproject.com/wiki/InstallationPitfalls which told me a similar solution. I needed to link to my bin and give permissions. Also the command needed to be run with django-admin2.6.py otherwise would not work.

Kevin Shin
  • 53
  • 1
  • 6

2 Answers2

1

Try: export PATH=$PATH:/usr/local/django/trunk/django/bin

Doug-W
  • 1,318
  • 12
  • 14
0

For solving the 'Permission Denied' error:

chmod +x path/to/bin/django-admin.py

Running the above in Terminal (edited to your own file) solved my own 'Permission Denied' error while setting up Django in a virtualenv on a Webfaction server.

brt
  • 154
  • 1
  • 2
  • 12