使用Postgresql在AWS Elastic Beanstalk中安装python程序会出现pg_config错误

问题描述 投票:0回答:1

我创建了一个使用Postgresql的python应用程序。在进行开发时,我使用了psycopg2库(v 2.8.4),但是当尝试将其安装在beantalk上时,会出现以下错误:

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

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).

任何人都知道如何解决这个问题?

postgresql amazon-web-services amazon-elastic-beanstalk
1个回答
0
投票

找到了问题的答案。代替直接安装psycopg2,请使用psycopg2-binary==2.8.4

也有人问类似的问题here

热门问题
推荐问题
最新问题