title: installation psycopg2 on MAC with error: pg_config executable not found
body: <p>I need your help with installation <code>psycopg2</code> on MAC.</p>
  
  <ol>
  <li>I've already installed:
  
  <ul>
  <li><strong>Python 3.7.3</strong> as a part of Anaconda environment</li>
  <li><strong>Postgres.app</strong> from <a href="https://postgresapp.com" rel="nofollow noreferrer">https://postgresapp.com</a></li>
  </ul></li>
  <li>When I'm trying to install psycopg2 package a terminal show me an error</li>
  </ol>
  
  <pre><code>    Error: 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:
  
      python setup.py build_ext --pg-config /path/to/pg_config build ...
  
      or with the pg_config option in 'setup.cfg'.
  </code></pre>
  
  <p>I've read a number of articles where they recommend to provide <code>$PATH</code> before installing <code>psycopg2</code>, but the problem is in a fact that <code>Postgres.app</code> doesn't create the <code>pg_config</code> directory:</p>
  
  <p><em>/Users/konstantin_klychkov/Library/Application Support/Postgres/var-12</em></p>