0

I am trying to follow the tutorial on Heroku for Django and get along till I come to pip install -r requirements.txt. While there is no problem with loading Django, dj-database and unicorn, loading psycopg2 stucks and get

Error: pg_config executable not found.

I have read over a few entries in SO like Getting Started with Python on Heroku and Can't figure out where Heroku app is failing. I have followed the answers and proposals there and I installed postgresql again via brew; all without success.

My PATH is

/usr/local/bin : /usr/bin : /bin : /usr/sbin : /sbin : /usr/local/lib/python2.7/site-pakages : /Applications/Postgres.app/Contents/Versions/9.6/bin : /Users/Martin/anaconda/bin : /usr/X11/bin

and my pg_config is where it should be and is added to the PATH. But I still get the message

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

I am on OSSiera 10.12.2. Help is appreciated.

Community
  • 1
  • 1
MarBlo
  • 4,195
  • 1
  • 13
  • 27

1 Answers1

0

Looks like postgresql-devel package is missing on your OS.

brew install postgresql

Should solve the issue.

user6399774
  • 116
  • 6
  • @user639774 postgresql was correctly installed. Thanks, – MarBlo Dec 18 '16 at 21:10
  • but I figured out that I had to add the path to pg_config to PATH. Once I found out where this file was I added it to the PATH and after closing and opening a new Terminal everything worked out. Thanks – MarBlo Dec 18 '16 at 21:13