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
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command outpu
发布于 2020-08-05 02:04:15
错误消息提供了解决方案:
If you prefer to avoid building psycopg2 from source, please install the PyPI
psycopg2-binary' package instead.
如果你这样做了:
pip install psycopg2
您需要在计算机上安装Postgres开发库。
更新
因此,按照错误消息的建议做:
pip install psycopg2-binary
那么您就不需要开发库了。
https://stackoverflow.com/questions/63256551
复制相似问题