相关疑难解决方法(0)

Mac + virtualenv + pip + postgresql =错误:找不到pg_config可执行文件

我试图为教程安装postgres,但是pip给了我错误:

pip install psycopg
Run Code Online (Sandbox Code Playgroud)

我得到一个错误:

Error: pg_config executable not found.

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'.
Run Code Online (Sandbox Code Playgroud)

pg_config我的virtualenv 在哪里?如何配置?我正在使用virtualenv,因为我不想在系统范围内安装postgres.

python postgresql macos psycopg2

74
推荐指数
9
解决办法
6万
查看次数

标签 统计

macos ×1

postgresql ×1

psycopg2 ×1

python ×1