On 9/17/07, Dave E <[EMAIL PROTECTED]> wrote:
>
> After reading about other OS X user's Django install problems, I'm
> attempting to write up the simplest, clearest possible, completely
> unambiguous, instructions for other OS X users here:
> http:ecoconsulting.co.uk/python/django-install.txt
> but obviously I need to get it right first, and...

We're always open to documentation improvements; thanks for offering to help.

> ...I've hit problems with Macports, detailed below. But I can't find
> anywhere how to install Django from within Python (like Perl's CPAN),
> and Macports is actually suggested on the Django site.

If you're installing from a downloaded version of Django (rather than macports)
The standard 'python setup.py install' will work, and will install
Django into the site-packages of whichever python install is on the
path at the time.

Macports is listed as one of the 'prepackaged installations' that may
be helpful if you're on a Mac. However, its not the only way to go.
Personally, I find Macports to be a very useful way of getting the
support libraries in place - in particular, Postgres, which doesn't
provide native Mac installers. I use an svn checkout of Django rather
than the ports version.

The instructions you provide will depend on how you satisfy your
dependencies. Ultimately, you will need to install:

1) Python
2) A database
3) A database Python library
4) Django code.

Macports can be used to provide any of these; personally, I use
Macports to provide 1-3.

As a guideline, this is what is in my .profile:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH=/opt/local/lib/pgsql8/bin:$PATH
export PATH=/opt/local/lib/python2.4/site-packages/django/bin:$PATH
export 
PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin:$PATH

> I know OS X needs Python elswhere (and I now appear to have 2 Pythons)
> but the running one doesn't have Django in its 'site-packages' dir.

Define 'needs'. OS X provides Python, but doesn't really use it at a
core level. It's not tightly bound to the OS or anything - it's just
there to fill the promise that OSX is 'based on Unix'.

> Looks like I might have to forget Macports and install Django manually
> under the OS X Python (or copy it across), but will this risk being
> mangled by OS X updates? And is there an easy Python 'install django'
> command?

As before - yes; python setup.py install in the Django directory.

The bigger problem is coming up with an easy answer for 'how to
install Postgres' (or any other database). The Apple knowledge base on
setting Postgres starts with 'download the Postgres source tarball',
which isn't a particularly attractive option to me. Then you need to
deal with compiling the psycopg backends, etc. For my money, 'port
install py-psycopg2' and setting up a few paths is much easier.

If you find (or know of) a good set of Postgres/MySQL binaries for OSX
(including Python bindings), this problem goes away. However, I
haven't been able to find such a beast.

> ---------------
> About Macports:
>
> Macports is a good idea (easy installs and updates, preserves Apple
> stuff, keeps new stuff separate from getting mashed by Apple updates)
> but the Python it installs isn't in the place OS X expects it to be,
> so can't be used easily.

Depends on your definition of easily. I can't say I had much
difficulty setting up my .profile, but I'm coming from a unix
background, so I'm used to that sort of thing.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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