首页 > 解决方案 > 在 Windows 10 上找不到 pg_config 可执行文件

问题描述

我已经安装了 PostgreSQL。我想我需要在 windows 上安装 libpq-dev 来解决这个问题,但是如何安装呢?

命令 python setup.py egg_info 的完整输出:运行 egg_info 创建 pip-egg-info\psycopg2_binary.egg-info 写入 pip-egg-info\psycopg2_binary.egg-info\PKG-INFO 写入 dependency_links 到 pip-egg-info\psycopg2_binary .egg-info\dependency_links.txt 将顶级名称写入 pip-egg-info\psycopg2_binary.egg-info\top_level.txt 写入清单文件 'pip-egg-info\psycopg2_binary.egg-info\SOURCES.txt'

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>).

标签: pythonpostgresqldll

解决方案


您可能已经安装了它,只是不在您的PATH.

您可以SET在命令行上使用来更改路径,这样pg_config就可以了。


推荐阅读