Problems using psycopg2 on Mac OS (Yosemite)

前端 未结 8 1351
盖世英雄少女心
盖世英雄少女心 2020-12-23 13:49

Currently I am installing psycopg2 for work within eclipse with python.

I am finding a lot of problems:

  1. The first problem sudo pip3.4 install ps
相关标签:
8条回答
  • 2020-12-23 14:24

    well, I'd like to give my solution, the problem is related with the version of c. So, I just typed:

    CFLAGS='-std=c99' pip install psycopg2==2.6.1
    
    0 讨论(0)
  • 2020-12-23 14:27

    In El Capitan, I used the same solution as @Forbze but 2 more commands as follows.

    sudo install_name_tool -change libpq.5.dylib /Library/PostgreSQL/9.3/lib/libpq.5.dylib  /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
    sudo install_name_tool -change libssl.1.0.0.dylib /Library/PostgreSQL/9.3/lib/libssl.1.0.0.dylib  /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
    sudo install_name_tool -change libcrypto.1.0.0.dylib /Library/PostgreSQL/9.3/lib/libcrypto.1.0.0.dylib  /Library/Python/2.7/site-packages/psycopg2/_psycopg.so
    

    It works perfectly!

    0 讨论(0)
提交回复
热议问题