首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Mac上安装psycopg2,未找到pg_config可执行文件

在Mac上安装psycopg2,未找到pg_config可执行文件
EN

Stack Overflow用户
提问于 2020-08-04 23:50:11
回答 1查看 995关注 0票数 1
代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-08-05 02:04:15

错误消息提供了解决方案:

代码语言:javascript
运行
复制
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

那么您就不需要开发库了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63256551

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档