pg_config executable not found

后端 未结 30 2158
渐次进展
渐次进展 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:23

    For those running OS X, this solution worked for me:

    1) Install Postgres.app:

    http://www.postgresql.org/download/macosx/

    2) Then open the Terminal and run this command, replacing where it says {{version}} with the Postgres version number:

    export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/{{version}}/bin

    e.g.

    export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin

提交回复
热议问题