Skip to content Skip to sidebar Skip to footer

I'm Trying To Install Psycopg2 Onto Mac Os 10.6.3; It Claims It Can't Find "stdarg.h" But I Can See It's There; What Should I Do?

I'm desperately trying to successfully install psycopg2 but keep running into errors. The latest one seems to involve it not being to find 'stdarg.h' (see code below). However I ca

Solution 1:

I don't know your specific problem but i recommend you to install it using macports. Installing psycopg2 is as simply as:

sudo port install py26-psycopg2

Solution 2:

The following works for me:

  1. $ mkvirtualenv --no-site-packages --distribute psycopg2_test
  2. $ cd $VIRTUAL_ENV
  3. $ pip install psycopg2

Notes

  • I installed my base Python via MacPorts.
  • The above commands make use of:

  • I bootstrapped pip via the following:

    1. wget http://python-distribute.org/distribute_setup.py
    2. python distribute_setup.py
    3. easy_install pip

UPDATE: I realize it seems like a lot of yak shaving, but learning how to use virtualenv and friends is an up-front investment that pays off pretty quickly, especially when dealing with projects that have a lot of dependencies.

Solution 3:

I actually had a very similar problem as this (except with OSX Lion, Python 2.7) Can't install psycopg2 in virtualenv "error: stdarg.h: No such file or directory".

I ended up using this solution: https://stackoverflow.com/a/8834568/396327

Basically, uninstalling/reinstalling XCode from scratch (and a few more hacks to get it to recognize gcc-4.2).

Post a Comment for "I'm Trying To Install Psycopg2 Onto Mac Os 10.6.3; It Claims It Can't Find "stdarg.h" But I Can See It's There; What Should I Do?"