-bash: django-admin.py: command not found

167 views
Skip to first unread message

ErritG

unread,
Nov 16, 2010, 3:43:21 AM11/16/10
to Django users
Hello everybody,

Even though many posts on the internet address this issue I haven't
been able to tackle it using version Python 2.7. Any help is welcom
for this new comer!

Thanks in advance for kind coop.

Errit.

Robbington

unread,
Nov 16, 2010, 4:47:01 AM11/16/10
to Django users


I dont think you are going to get a great deal of help if you just
repeat your posts, http://groups.google.com/group/django-users/browse_thread/thread/bab395cd78eca494?hl=en#
There was some sound advice from experienced users of Django and
Linux.

There are also already some great tutorials on installing Django,
django admin commands and this problem,

http://code.djangoproject.com/wiki/InstallationPitfalls
http://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocs
http://docs.djangoproject.com/en/dev/topics/install/?from=olddocs

If you are still having trouble after the solution being
comprehensivley explained go further by stating what you dont
understand, or where you are struggling.

As it was stated before, its not to do with your version of Python,
but your installation of Django. a copy of Django-admin.py needs to be
in the folder usr/bin for your linux system to know that it is a
system command.

ErritG

unread,
Nov 16, 2010, 5:53:13 AM11/16/10
to Django users
Let me start of with apologising for a double post and thanking you
for your reference.

I think my problem lays with finding the right directory. From the
offered solution (http://code.djangoproject.com/wiki/
InstallationPitfalls) I don't now how to determine the right 'Link
<django_installation>/bin/django-admin.py to whereever on your PATH'
So far I have found out that python seems to be 'hiding' in /Library/
Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
My question now is: how should I phrase the 'sudo ln -s' command?

Thanks again for your help!

Bgrds,

Errit.


On 16 nov, 10:47, Robbington <robbing...@hotmail.co.uk> wrote:
> I dont think you are going to get a great deal of help if you just
> repeat your posts,http://groups.google.com/group/django-users/browse_thread/thread/bab3...
> There was some sound advice from experienced users of Django and
> Linux.
>
> There are also already some great tutorials on installing Django,
> django admin commands and this problem,
>
> http://code.djangoproject.com/wiki/InstallationPitfallshttp://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocshttp://docs.djangoproject.com/en/dev/topics/install/?from=olddocs

Robbington

unread,
Nov 16, 2010, 6:40:58 AM11/16/10
to Django users
Thats ok, I can appriciate how frustrating it can be trying to learn
of your own back from the beginning as a lot of the advice can seem to
be in a foreign language. But if you dont understand you need to state
that, as often if you double post people will just ignore you, noone
gets paid to submit on these forums.....


Anyways, to your problem.

Firstly, understand that python looks in the folder site-packages to
find any additional packages like django. I'm guessing that your
problem is that you have not installed Django properly, check to see
if you have a folder in site-packages named Django.

Secondly, Linux looks in the usr/bin folder for system commands. So
When you type django-admin.py into the command prompt, linux looks in
that folder and if it cant find djang-admin.py it returns that error
you are seeing.

At the command prompt: find / -name 'django' to make sure that there
is a folder inside site-packages called django.

How are you going about installing django? apt-get install,
easy_install, pip install?




As mentioned before creating a symbolic link isnt the best way to go
about it, installing django properly is your best bet. You will save
yourself a lot of trouble in the long run.

But just getting it working is often half the learning battle, so if
you feel you really need to, locate django-admin.py: find / -name
'django-admin.py'

and make a symbolic link to your usr/bin folder. It should be located
at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
site-packages/django/bin/django-admin.py

So you would type: sudo ln -s /Library/Frameworks/Python.framework/
Versions/2.7/lib/python2.7/site-packages/django/bin/django-admin.py /
usr/bin.

I hope I havnt been to condesending, just trying to put it in easy
terms. I will however STRESS again, dont just create a symbolic link,
install Django properly.

Rob

Matthias Runge

unread,
Nov 16, 2010, 8:25:40 AM11/16/10
to django...@googlegroups.com
Make sure wether django is properly installed on your system. I think your problem lies there.
Matthias

"ErritG" <errit.gr...@gmail.com> schrieb:

>--
>You received this message because you are subscribed to the Google
>Groups "Django users" group.
>To post to this group, send email to django...@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.

Nuño Iglesias

unread,
Nov 16, 2010, 8:02:17 AM11/16/10
to django...@googlegroups.com
El Tue, 16 Nov 2010 00:43:21 -0800 (PST)
ErritG <errit.gr...@gmail.com> escribió:

Try to add "python"
$python manage.py

;-)

ErritG

unread,
Nov 16, 2010, 8:48:06 AM11/16/10
to Django users
Hi Rob,

Thanks very much for your help. Installing Django properly solved all
the problems encountered!

Don't worry about being anything other then very helpful. Much
appreciated.

Errit.

Robbington

unread,
Nov 16, 2010, 8:56:33 AM11/16/10
to Django users
You are welcome Errit,

Have fun Django-ing. :)
Reply all
Reply to author
Forward
0 new messages