3

I have django-admin.py in usr/local/bin and I have tried all the help given on the web to make a symbolic link but it still says django-admin.py: command not found.

I am trying to start of my first project in django :- django-admin.py startproject mysite.

No matter what I do I just keep on getting django-admin.py: command not found.

I am using ubuntu 11.10.

Thanks

7
  • What does your PATH look like? Try typing echo $PATH at the prompt. Commented Aug 3, 2012 at 7:43
  • /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin:/usr/local/bin:/usr/local/bin Commented Aug 3, 2012 at 7:47
  • And you're sure that django-admin.py is, in fact, in /usr/local/bin? What does which django-admin.py return? Commented Aug 3, 2012 at 7:52
  • Can you check if the script is executable? Commented Aug 3, 2012 at 7:53
  • it returns nothing.the prompt appears again. I tried opening django-admin.py but it wont. it says - The Link "django-admin.py" is Broken. Move it to Trash? Commented Aug 3, 2012 at 7:55

3 Answers 3

4

just type

django-admin startproject mysite 
Sign up to request clarification or add additional context in comments.

Comments

1

I would recommend to remove it and install Django again.

Or use virtualenv http://www.mahdiyusuf.com/post/5282169518/beginners-guide-easy-install-pip-and-virtualenv-1

3 Comments

I went removed Django and installed pip and virtualenv. I tried django-admin.py startproject mysite - but the problem still remains.
How do I make use of what I just did?
You need to create virtualenv like "virtualenv --no-site-packages /path/to/your/env" and then activate it with "source /path/to/your/env/bin/activate". That will change temporary your path, and you can check you're using it because the prompt also changed. Then, try to install Django again (pip install django) and check if that works.
1

i have the same Problem. the django-admin.py for me was in this Path ~/.local/bin. this because i run pip instal --user django

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.