↓ Archives ↓

Installing psycopg2 on Leopard

Have been building a site using Turbogears 2.0 of late (which is awesome), and decided it was time to start setting up my staging and production environments.  Thus far I have just been developing locally with sqlite, but in production I want to use postgresql… so tried to install psycopg2 via distutils and was met with the following error

NameError: global name 'w' is not defined

Eek!

Finding the solution seemed to take me far too many googles… so thought I’d pop up here so I have no excuse for forgetting next time I do exactly the same

For me the solution was to add the following to my path, since I appears that pscopg2 requires postgres to be installed before it can compile (My version of postgres is installed via macports)

export PATH=/Library/PostgreSQL/8.3/bin:$PATH

Once the postgres bin folder was in the path pscopg2 compiled without any troubles. Win

3 Comments

  • Pingback

    May 16th 200923:05
    by Twitted by howdous

    Reply

    [...] This post was Twitted by howdous – Real-url.org [...]

  • Jul 5th 200917:07
    by Tudor

    Reply

    I’m trying to install psycopg2 now and I was wondering what version did you manage to install. I keep getting

    running build_ext
    error: No such file or directory

  • Jul 21st 200908:07
    by tiblu

    Reply

    To Tudor:
    I got the same message until I installed PostgreSql server. I installed on Cygwin.

  • Leave a Reply