开发者

Django: When creating a new project, "django-admin.py: command not found" Error pops up

I've been following the tutoria开发者_Go百科l 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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜