Error: pg_config executable not found.

亦凉 2022-11-27 02:00 294阅读 0赞

pip 安装 psycopg2 安装及错误

现象:

  1. Error: pg_config executable not found.
  2. Please add the directory containing pg_config to the PATH
  3. or specify the full executable path with the option:
  4. python setup.py build_ext --pg-config /path/to/pg_config build ...
  5. or with the pg_config option in 'setup.cfg'.
  6. Complete output from command python setup.py egg_info:
  7. running egg_info
  8. creating pip-egg-info/psycopg2.egg-info
  9. writing pip-egg-info/psycopg2.egg-info/PKG-INFO
  10. writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
  11. writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
  12. writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
  13. warning: manifest_maker: standard file '-c' not found

解决方法

1、安装libpq-dev

  1. sudo apt-get install libpq-dev python-dev

2、pip安装
···
pip install psycopg2
···

了解更多,请关注公众号

公众号

发表评论

表情:
评论列表 (有 0 条评论,294人围观)

还没有评论,来说两句吧...

相关阅读