pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the $PATH or specify the full executable path with the option code example
Example: Error: pg_config executable not found.
sudo apt-get install libpq-dev python-dev