Installez libpq-dev sur Mac OS X

Je suis en train de lancer de Django avec un Postgresql backend sur mon Mac OS X. j'ai installé Django utilisation de pip:

sudo pip install Django

J'ai installé Postgresql avec l'un des binaires installateurs ici.

Mais lorsque j'essaie d'installer psycopg2 j'obtiens une erreur (collé ci-dessous) qu'il ne peut pas trouver pg_config.

De cette question il me semble que je doit installer libpq-dev mais je ne suis pas sûr de savoir comment.

J'ai essayé d'installer libpqxx avec MacPorts, mais qui n'a pas fait quoi que ce soit.

Comment puis-je obtenir libpg-dev installé? Ou est-il autre chose que je suis absent?

henrietta:~ $ pip install psycopg2
Downloading/unpacking psycopg2
  Downloading psycopg2-2.4.5.tar.gz (719Kb): 719Kb downloaded
  Running setup.py egg_info for package psycopg2
    Error: pg_config executable not found.

    Please add the directory containing pg_config to the PATH
    or specify the full executable path with the option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.
    Complete output from command python setup.py egg_info:
    running egg_info

creating pip-egg-info/psycopg2.egg-info

writing pip-egg-info/psycopg2.egg-info/PKG-INFO

writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt

writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt

writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found

Error: pg_config executable not found.



Please add the directory containing pg_config to the PATH

or specify the full executable path with the option:



    python setup.py build_ext --pg-config /path/to/pg_config build ...



or with the pg_config option in 'setup.cfg'.

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/thomas/.pip/pip.log

source d'informationauteur tchaymore