Azure上的Django Postgres客户端

达斯汀

我正在尝试在Azure上运行Django应用,我想使用我们已经拥有的Postgres数据库。所以我需要安装psycopg2 python软件包。

注意:我在Mac上并使用git进行部署。

我的requirements.txt很简单:

django==1.6.2
pytz
psycopg2

但是,当尝试查找postgres二进制文件时进入psycopyg2时,它将失败。

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

我尝试将Windows Postgres二进制文件添加到/ pgsql的项目中,然后在Azure中更新配置以包括该文件夹。我希望能够附加到PATH,但是configure选项卡告诉我这是不允许的。

似乎我可能需要启动脚本或其他方式来加载这些依赖项。在Mac上,只有Visual Studio,找不到太多有关如何执行此操作的参考。

我是否只需要移至虚拟机?

沃伦德拉

有一个psycopg2-windowsPython 2.7的示例:

pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py27#egg=psycopg2

win-psycopg ptoject主页上也有安装说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Mac上的Node / deno Postgres客户端运行缓慢

来自分类Dev

Azure KeyVault 客户端 1.0.0 启动客户端

来自分类Dev

如何使用MacPorts在OS X上安装Postgres命令行客户端(psql)?

来自分类Dev

Django + Celery + Apache mod_wsgi + Postgres + RabbitMQ应用程序用于多个客户端

来自分类Dev

在Azure上按站点请求客户端证书

来自分类Dev

从客户端连接到Azure上的MongoDB

来自分类Dev

从Azure ping客户端LAN

来自分类Dev

Azure DevOps的客户端凭据流

来自分类Dev

Azure App客户端机密

来自分类Dev

mongo上的纯JavaScript客户端?

来自分类Dev

ReactNative上的Firebase客户端

来自分类Dev

Mac上的Oracle Sqlplus客户端

来自分类Dev

<h:inputFile>上的客户端验证

来自分类Dev

Android上的Thrift客户端

来自分类Dev

Android上的UDP客户端

来自分类Dev

Xamarin Studio上的Sip客户端

来自分类Dev

在Debian上配置SSTP客户端

来自分类Dev

LTSP客户端在busybox上启动

来自分类Dev

客户端C上的read()失败

来自分类Dev

Android上的UDP客户端

来自分类Dev

在ubuntu 15.04上发现客户端

来自分类Dev

隔离域上的客户端?

来自分类Dev

在客户端请求上隐藏标题

来自分类Dev

JMeter 上的客户端同步

来自分类Dev

django rest框架的客户端?

来自分类Dev

客户端JS + Django Rest Framework

来自分类Dev

Django测试客户端未登录

来自分类Dev

不同客户端的Django权限

来自分类Dev

Django 测试客户端发布数据