解决pip报错Error: pg_config executable not found.

报错如下:

running egg_info
    creating /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info
    writing /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-ez6k71_8/psycopg2_binary.egg-info/SOURCES.txt'

    Error: pg_config executable not found.

原因是系统缺少postgresql-devel这个包。

解决:

yum install postgresql-devel

重新运行pip安装,问题解决。

本文为原创文章,转载请注明出处。

原文链接:https://850406.xyz/post/解决pip报错error-pg_config-executable-not-found

评论(0)

还没有评论,来抢沙发吧~

验证码