Can't install psycopg2 package through pip install… Is this because of Sierra?

后端 未结 13 1171
逝去的感伤
逝去的感伤 2020-11-28 01:35

I am working on a project for one of my lectures and I need to download the package psycopg2 in order to work with the postgresql database in use. Unfortunately, when I try

13条回答
  •  误落风尘
    2020-11-28 02:31

    1. Install/update Xcode developer tools

      xcode-select --install
      
    2. Query postgres path

      find / -name pg_config  2>/dev/null
      
    3. Install psycopg2, use the path you got in step 2. Mine was '/usr/local/Cellar/postgresql/9.5.0/bin/pg_config'

      PATH=$PATH:/usr/local/Cellar/postgresql/9.5.0/bin/ pip install psycopg2
      

提交回复
热议问题