Installing psycopg2 on Mac 10.6.4 Snow Leopard

Setting up Django for use with Postgres 8.3. Django uses psycopg2 (or psycopg depending on what you choose). To the best of my knowledge psycopg2 v2.2.2 is the most stable version of the code.

easy_install "psycopg2=2.2.2"

Then edit your file for Django.

DATABASE_ENGINE = ‘postgresql_psycopg2’

Psycopg2 Error

The easy_install for psycopg2 didn’t work immediately because easy_install could not find pg_config and caused compile process failed. To fix the problem I needed my environment to have access to Postgres 8.3 pg_config. The default MacPorts install of Postgres 8.3 drops pg_config and other key files into /opt/local/lib/postgresql83/bin/ .

To allow your easy_install environment to see pg_config, simply symbolically link it to your ~/bin directory. It does not have to be ~/bin. It could be any directory on your environment path. Just pick something easy.

# symbolic link from MacPorts install of postgres to a path on my home dir.
ln -s /opt/local/lib/postgresql83/bin/pg_config ~/bin/pg_config

I edited my .bash_profile so that the files in ~/bin is always on my environment path.

# set PATH so it includes user’s private bin if it exists
if [ -d ~/bin ] ; then
if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion

Ubuntu tips

Ubuntu kills me some time. Especially GNOME. Inspired by co-workers who have successfully put together some impressive gaming rigs, I thought I would renew my request for a half decent (low-powered) home theater PC (HTPC)

Problem: GNOME Desktop settings conflict.

First, GNOME wouldn’t start because I had some old GNOME setup files in the way. These instructions will help you remove old GNOME configurations. Then when you restart GNOME will assume it is your first login and create a new default desktop environment for you.

Next problem: Missing Video Drivers and Display configurations.

I’m using an old VIA EPIA M1000 mini-ITX Motherboard / Mainboard. The EPIA M1000 motherboard has a built-in graphics chip that is not plug-and-play with Ubuntu 10.10 Maverick as far as I can tell. It takes a little research. This mainboard has a CLE266 video chipset requiring Unichrome drivers. I have no idea what this means.

Ubuntu documentation reveals built-in support for Unichrome chipsets but you still have to do a little work to make it functional.


I had to add this to my xorg.conf file to get setup the driver.

Section "Device"
	Identifier	"VIA CLE266"
	Driver		"via"
	Option "ActiveDevice" 	"LCD"
	#Option "ActiveDevice" 	"CRT,TV"
	#Option "TVType" 	"NTSC"
	#Option "TVOutput"	"Composite"
	Option "DisableIRQ"
	Option "EnableAGPDMA"	"true"
Section "DRI"
    Group     0
    Mode    0666

This section is to identify my antiquated monitor (a 15-inch flat screen circa 2002)

Section "Monitor"
	Identifier	"ViewSonic"
	ModelName "ViewSonic VG150"
	Option		"DPMS" "true"
	HorizSync	30 – 62
	VertRefresh	50 – 75
	Modeline "640×480" 25.175 640 664 760 800 480 491 493 525 #60Hz
	Modeline "800×600" 40.12 800 848 968 1056 600 601 605 628 #60Hz
	Modeline "1024×768" 75 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
	Modeline "1024×768" 85 1024 1056 1152 1360 768 784 787 823

For a deeper understanding of the xorg.conf file, this is a good resource.

There is a “gtf” command to determine “Modeline” information above. I never knew that! (

$: gtf x y refresh

Some keywords I needed to find the necessary info:

Ubuntu 10.10 Maverick Meerkat
CLE266 unichrome driver
man openchrome
man xorg.conf

Django RSS feed aggregators

The plan — integrate RSS feeds into my crappy car website. Re-syndicating many feeds from (List of feeds)


On the Toyota page of my site, display snippets from the Toyota feed.


Mark Pilgrim’s Feed Parser

Django Reader


How-To customize Aggregator

Syndicate content