title: How to fix Error: pg_config executable not found on Elastic Beanstalk permanently
body: <p>I have a Django project that works with PostgreSQL on Elastic Beanstalk. 
  I have found the next error when deploying:</p>
  
  <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 ...
  </code></pre>
  
  <p>I followed <a href="https://stackoverflow.com/questions/33747799/psycopg2-on-elastic-beanstalk-cant-deploy-app/34957820#34957820">psycopg2 on elastic beanstalk - can&#39;t deploy app</a> to solve it and it worked! BUT after a while Amazon seems to update my virtual env and the error returns so I have to go back and do the same stuff over and over again. </p>
  
  <p>I also have tried configuring the database instance directly from the Elastic Beanstalk panel but nothing changes. </p>
  
  <p>The database is on RDS and I think it's important to say that when I manually install psycopg2 on my instance and re-deploy everything works fine, I even have made a couple of deploys after that and the problems is not there but it is after a while.</p>
  
  <p>I really want to know how to solve it once for all. Thanks in advance.</p>