Installing Django on OS X 10.5 (Leopard)

This is a quick update to my previous installing django posts.

Today I got my hands on Leopard, so far I’ve been happy but went I went about reinstalling Django I hit a snag.  MacPort would encounter an error whenever it tried to build PostgreSQL.  If you can wait a little while the port maintainer for PostgreSQL should fix the problem.

On the other hand if you need Django running today you can follow the steps at Lee Packham’s Corner to get PostgreSQL running.  Unfortunately this will get you PostgreSQL 8.2 (not inherently a bad thing) which means you will need to manually build and install psycopg2 since the MacPorts psycopg2 package depends on PostgreSQL 8.1.  Here’s what you will need to do to manually build and install pyscopg2:

  • Download the source from http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo.
  • Extract the files using the command tar -xzf psycopg2-latest.tar.gz.
  • Open the file setup.cfg file and look for the line that starts with pg_config=
  • Change the line to read pg_config=/opt/local/var/macports/software/postgresql82/8.2.5_0+darwin_9/opt/local/lib/postgresql82/bin/pg_config
  • Run the command python setup.py build
  • Run the command python setup.py install

Now you should be all set!

On a related note if your interested in learning about Djago and you’ll be around Poughkeepsie, NY this Wednesday stop by at the MHVLUG meeting, I’ll be giving a Intro to Django talk.

Advertisements

~ by seanoc on October 30, 2007.

5 Responses to “Installing Django on OS X 10.5 (Leopard)”

  1. For the django part of this, i just check out the trunk to /usr/local/django and symlink it to the site-packages dir.

  2. I don’t think so. You have to revise your looks. In general your blog is good, but sometimes your posts are creepy.

  3. A simpler way of installing Postgresql is to take advantage of the Mac Installer produced by EnterpriseDB:

    http://www.enterprisedb.com/products/download.do

    PostgresqlPlus is free: it’s EDB’s packaging of Postgresql with a better installer. PostgresqlPlus Advanced Server is EnterpriseDB’s proprietary extension to Postgresql adding Oracle compatibility.

    It installs itself nicely in the /Library folder, with a StartupItem properly configured to boot…

  4. answers…

    Some hotels don’t conforms the descriptions, that is why real reviews of people who stayed there are very useful….

  5. using the druware install of postgresql 8.3 the pg_config line should be pg_config=/Library/PostgreSQL8/bin/pg_config , however the rest of the posts helped quite a bit, thanks.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: