pg_config executable not found

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

    To those on macOS Catalina using the zsh shell who have also installed the postgres app:

    Open your ~/.zshrc file, and add the following line:

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

    Then close all your terminals, reopen them, and you'll have resolved your problem.

    If you don't want to close your terminals, simply enter source ~/.zshrc in whatever terminal you'd like to keep working on.

提交回复
热议问题