I am trying to get a Django app running on Azure and I would like to use a Postgres database that we already have in place. So I need to have the psycopg2 python package installed.
Note: I am on a Mac and deploying with git.
My requirements.txt is simple:
django==1.6.2
pytz
psycopg2
However it fails when it gets to psycopyg2 while trying to find postgres binaries.
remote: Downloading/unpacking psycopg2 (from -r requirements.txt (line 3))
remote: Running setup.py (path:D:\home\site\wwwroot\env\build\psycopg2\setup.py) egg_info for package psycopg2
remote:
remote: Error: pg_config executable not found.
remote:
remote: Please add the directory containing pg_config to the PATH
remote: or specify the full executable path with the option:
remote:
remote: python setup.py build_ext --pg-config /path/to/pg_config build ...
remote:
remote: or with the pg_config option in 'setup.cfg'.
remote: Complete output from command python setup.py egg_info:
remote: running egg_info
remote:
remote: creating pip-egg-info\psycopg2.egg-info
remote:
remote: writing pip-egg-info\psycopg2.egg-info\PKG-INFO
remote:
remote: writing top-level names to pip-egg-info\psycopg2.egg-info\top_level.txt
remote:
remote: writing dependency_links to pip-egg-info\psycopg2.egg-info\dependency_links.txt
remote:
remote: writing manifest file 'pip-egg-info\psycopg2.egg-info\SOURCES.txt'
remote:
remote: warning: manifest_maker: standard file '-c' not found
remote:
remote:
remote:
remote: Error: pg_config executable not found.
remote:
remote:
remote:
remote: Please add the directory containing pg_config to the PATH
remote:
remote: or specify the full executable path with the option:
remote:
remote:
remote:
remote: python setup.py build_ext --pg-config /path/to/pg_config build ...
remote:
remote:
remote:
remote: or with the pg_config option in 'setup.cfg'.
I have tried adding the Windows Postgres binaries to my project at /pgsql and then updating the configurations in Azure to include that folder. I was hoping to be able to append to PATH, but the configure tab is telling me that is not allowed.
Seems like I might need a startup script or some other way to get these dependencies loaded. I couldn't find too many references on how to do this from a Mac, only Visual Studio.
Do I just need to move to a VM?