1
我想要获得在Azure上运行的Django应用程序,并且我想使用我们已有的Postgres数据库。所以我需要安装psycopg2 python软件包。Azure上的Django Postgres客户端
注意:我在Mac上并使用git进行部署。
我requirements.txt很简单:
django==1.6.2
pytz
psycopg2
当它到达psycopyg2在试图查找Postgres的二进制但是它失败。
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'.
我试图在/ pgsql的添加Windows Postgres的二进制文件到我的项目,然后更新Azure中的配置,包括文件夹中。我希望能够追加到PATH,但配置选项卡告诉我,这是不允许的。
好像我可能需要启动脚本或其他方式来获得这些依赖加载。我无法找到太多关于如何从Mac访问的参考,只有Visual Studio。
我只需要移动到虚拟机?
这是psycopg for Windows。 http://www.stickpeople.com/projects/python/win-psycopg/。此外,Windows Azure提供了Linux机器,您不应该有这样的问题。 – wolendranh 2014-12-02 14:23:30
是的,我如何获得win-psycopg的安装?我一直在寻找更新deployment.sh文件来做到这一点。理想情况下,我不想使用虚拟机。 – Dustin 2014-12-03 15:29:31
@ dds1024:你是否修改了你的requirements.txt来最终做到这一点?我正在努力解决类似的问题。 – 2015-11-27 13:50:30