pg_config executable not found

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

    If you're trying to add a psycopg2 dependency in your virtual environment that will allow your python project to connect to your docker or kubernetes pod that's running postgresql separately, on your Mac and are not really interested in installing postgresql on your Mac just so that you can get pg_config, here's what you do instead:

    Install psycopg2_binary as suggested in the error output from the pipenv install and everything will work out just fine.

提交回复
热议问题