On Sep 2, 5:30 pm, Jason Ourscene <[EMAIL PROTECTED]> wrote:
> when i run
> which django-admin.py i get:
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
> packages/django/bin/django-admin.py

But as asked before. What is the first line of that file? Ie., run:

 head -1 /Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/django/bin/django-admin.py

The first line of that file is important as it determines which
version of Python is used. If the first line of that file is something
like:

  #!/usr/bin/env python

Then the 'python' executable used will be that in your PATH, which if
that is /usr/bin/python will likely be Python 2.3 which comes with
Tiger.

Thence you have the problem, you are running a script installed into
Python 2.4 installation with Python 2.3 and thus it will not find
installed Django because Python 2.3 will be looking elsewhere.

Thus, you either need to have:

  /Library/Frameworks/Python.framework/Versions/2.4/bin

in your PATH first, or run django-admin.py as:

  /Library/Frameworks/Python.framework/Versions/2.4/bin/python /
Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
packages/django/bin/django-admin.py

That is, explicitly run Python 2.4 with script as argument, plus
options for script.

End result is that if you want to use Python 2.4, then yes you will
need to consolidate your PATHs and have MacPorts Python bin directory
in its somewhere.

To see what is happening now with PATHs, run:

  echo $PATH

and post that as well.

Graham

> ps. graham, thanks for the forum etiquette lesson.. im new to this. =]
>
> On Aug 31, 7:50 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
> > How are you running 'django-admin.py' and what is the first line of
> > that file?
>
> > Graham
>
> > On Sep 1, 1:23 am, Jason Ourscene <[EMAIL PROTECTED]> wrote:
>
> > > when i run ls -las /usr/bin/python i get:
> > > 8 lrwxr-xr-x   1 root  wheel  9 Jul 21 22:50 /usr/bin/python ->
> > > python2.3
>
> > > when run "which python"
> > > /usr/bin/python
>
> > > I did not use macports, what i did do was install a later version of
> > > python using this tutorial
> > > <a href="http://blog.vixiom.com/2006/07/23/how-to-install-django-on-os-
> > > x-tiger-104/">How To: Install Django on OS X (Tiger 10.4) </a>
>
> > > and also, im seem to have profile stuff everywhere.
> > > my .bash_profile:
> > > export PATH=/Library/Frameworks/Python.framework/Versions/2.4/lib/
> > > python2.4/site-packages/django/bin:$PATH
>
> > > my .profile:
> > > # Setting PATH for MacPython 2.4
> > > # The orginal version is saved in .profile.pysave
> > > PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:$
> > > {PATH}"
> > > export PATH
>
> > > my .bash_login:
> > > export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:
> > > $PATH"
>
> > > Can i consolidate these into one? or do they all server different
> > > purposes?
>
> > > Thanks in advance.
> > > Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to