为什么要求pg_config安装在django / sqlite应用程序中?

时间:2020-01-29 22:59:04

标签: python django heroku

我试图在heroku上部署电子商务应用程序,但没有成功。

尝试安装pip3 install django-heroku后出现错误,详细说明pg_config executable not found.

我认为我的python安装可能存在一些问题,但我不这样认为,因此,我不明白为什么我要问pg_config是否在使用sqlite?因此,这是我尝试运行pip3安装后遇到的错误:

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.

1 个答案:

答案 0 :(得分:0)

django-heroku软件包的要求是psycopg2软件包

由于存在错误,您可以安装psycopg2-binary而不需要安装pgsql

pip install psycopg2-binary