Installer psycopg2 pour Anaconda Python

J'ai Anaconda Python 3.4, cependant chaque fois que j'exécute plus âgés code que j'ai passer à Anaconda Python 2.7 en tapant "source activer python2". Mon problème est que j'ai psycopg2 installé pour Anaconda Python 3.4, mais pas pour Anaconda Python 2.7. Quand je lance pip install psycopg2 (sur Python 2.7), je reçois le message suivant:

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'.

Je suis assez nouveau dans la programmation et ont besoin d'aide dans:

1. Obtaining directory containing pg_config
2. Finding the path to Anaconda Python 2.7 
3. Adding pg_config to the PATH.

Après avoir terminé ces étapes, je devrais être en mesure de pip installer psycopg2

InformationsquelleAutor user3062459 | 2015-07-28