pg_config executable not found

后端 未结 30 2517
渐次进展
渐次进展 2020-11-22 15:42

I am having trouble installing psycopg2. I get the following error when I try to pip install psycopg2:

Error: pg_config executable not found.

P         


        
30条回答
  •  盖世英雄少女心
    2020-11-22 16:28

    Here, for OS X completeness: if you install PostgreSQL from MacPorts, pg_config will be in /opt/local/lib/postgresql94/bin/pg_config.

    When you installed MacPorts, it already added /opt/local/bin to your PATH.

    So, this will fix the problem: $ sudo ln -s /opt/local/lib/postgresql94/bin/pg_config /opt/local/bin/pg_config

    Now pip install psycopg2 will be able to run pg_config without issues.

提交回复
热议问题