OS X 10.6 Snow Leopard Setup Tutorial

4 views
Skip to first unread message

Jonathan Eatherly

unread,
Jan 15, 2010, 1:37:02 PM1/15/10
to Django users
Hi all,
Anyone who has ever tried to install a working Django stack on OS
X 10.6 knows it can be quite a nuisance. I took the time out of my day
to fix this and wrote my own setup tutorial. There are many other
tutorials out but frankly they all suck. If you follow my tutorial,
you will have mysql, Django, mysql_python, libjpeg, and PIL installed;
basically a working Django stack.

http://blaolao.com/setting-up-django-mysql-mysql-python-pil-etc

One of these days I would like to make a DMG that sets up
everything for the user. If anyone would be interested in a DMG single
setup executable please let me know and maybe I will make it a weekend
project.

Malcolm Box

unread,
Jan 15, 2010, 5:41:17 PM1/15/10
to django...@googlegroups.com
On Fri, Jan 15, 2010 at 6:37 PM, Jonathan Eatherly <jonathan...@gmail.com> wrote:
   One of these days I would like to make a DMG that sets up
everything for the user. If anyone would be interested in a DMG single
setup executable please let me know and maybe I will make it a weekend
project.


I'd be eternally grateful (well, at least pretty happy) with such a DMG - I've spent too much time fighting this particular install for my sanity.

A couple of comments from when I've done this:

- an easier way to get libjpeg is to install MacPorts (http://www.macports.org) which gives an apt like package manager ('port')
- my incomplete notes from doing this suggest that with MySQL on the path then easy_install MySQLdb will work.  The key seems to be having my.conf on the path

Thanks,

Malcolm

PS s/bellow/below/g in your post :)

Matt Schinckel

unread,
Jan 15, 2010, 6:52:38 PM1/15/10
to Django users
On Jan 16, 8:41 am, Malcolm Box <malcolm....@gmail.com> wrote:
> On Fri, Jan 15, 2010 at 6:37 PM, Jonathan Eatherly <
>
> jonathan.eathe...@gmail.com> wrote:
> >    One of these days I would like to make a DMG that sets up
> > everything for the user. If anyone would be interested in a DMG single
> > setup executable please let me know and maybe I will make it a weekend
> > project.
>
> I'd be eternally grateful (well, at least pretty happy) with such a DMG -
> I've spent too much time fighting this particular install for my sanity.
>
> A couple of comments from when I've done this:
>
> - an easier way to get libjpeg is to install MacPorts (http://www.macports.org) which gives an apt like package manager ('port')
> - my incomplete notes from doing this suggest that with MySQL on the path
> then easy_install MySQLdb will work.  The key seems to be having my.conf on
> the path
>

I use brew (http://github.com/mxcl/homebrew) instead of MacPorts.

IIRC, I had to install git first, but everything else is installed
view brew, without the requirements of sudo, which makes a nice
change.

You can even have it so that it installs python modules/ruby gems in
the same manner.

Matt.

dk

unread,
Jan 16, 2010, 8:27:49 AM1/16/10
to Django users
Thanks for posting this. You are right -- OSX is not an easy platform
for development, because apple has nothing akin to apt-get. (Why they
have not done this, I cannot guess. Surely it cannot be because
people find macports and fink to be reliable and useful.)

A couple of points:

1. I found that:

sudo easy_install mysql-python

worked well, which saves a bit of editing and compiling.

2. Using this (at least with fastcgi) is problematic, because the
webserver user ("_www" on OSX) tries to write eggs to locations in
which it lacks permissions. I guess the solution is to add the
following:

os.environ['PYTHON_EGG_CACHE'] = "..."

to the fastcgi script, in which the ... is replaced with something
that is sensible and safe. But I'm not too sure what is sensible
(e.g. things in /tmp get erased by cron jobs) and I certainly have no
idea what is safe, so I punted and switched to sqlite3, which seems to
work well.

3. A DMG would be terrific.

Thanks much for posting this.

Reply all
Reply to author
Forward
0 new messages