install Psycopg2 on mac osx 10.9.5

sg_sg94 picture sg_sg94 · Nov 23, 2015 · Viewed 91.9k times · Source

I'm trying to install Psycopg2 on my Mac-book. I still get the same error. I found a lot of same questions on Stack Overflow but no answer seems to work. I think it is outdated. I'm using:

Mac osx 10.9.5
Python 3.4.3
                 

My error code is:

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

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

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 in /Users/sg/build/psycopg2 Storing complete log in /Users/sg/Library/Logs/pip.log

Answer

Laban funky monky picture Laban funky monky · Oct 5, 2019

I ran pip install psycopg2-binary and it worked like charm

More info about the binary package