Mac OSX — Psycopg2 Symbol not found: _PQbackendPID Expected in: flat namespace

This problem was tough to hunt down and various instructions didn’t work. Switching to 32 bit python did not work.

Here’s what did work for OSX 10.6.8, Postgresql and psycopg2 2.4.2

1. Download the source Psycopg2 from http://initd.org/psycopg/download/
2. Extract the tarball and cd into the directory.
3. Run easy_install on the directory (do NOT run easy_install psycopg2) – run `easy_install .`
4. Done.

I also modified the setup.cfg file line pg_config to the directory returned by `which pg_config` BUT it occurs to me that the line was commented out – so the solution must be to run easy_install on the latest version.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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