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

我创建了一个使用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>).

有人知道如何解决吗?

abc504169814 回答:使用Postgresql在AWS Elastic Beanstalk中安装python程序会导致pg_config错误

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

也有人问类似的问题here

本文链接:https://www.f2er.com/3153403.html

大家都在问