【问题标题】:Installing python program in AWS Elastic Beanstalk with Postgresql gives pg_config error使用 Postgresql 在 AWS Elastic Beanstalk 中安装 python 程序会导致 pg_config 错误
【发布时间】:2019-11-06 18:13:30
【问题描述】:

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

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】:

    找到问题的答案。不要直接安装psycopg2,而是使用psycopg2-binary==2.8.4。

    here也有人问了类似的问题

    【讨论】:

      猜你喜欢
      • 2020-06-08
      • 2016-03-11
      • 2020-09-18
      • 1970-01-01
      • 2015-09-26
      • 2018-07-01
      • 1970-01-01
      • 2017-03-26
      • 2013-07-08
      相关资源
      最近更新 更多