Import psycopg2 Library not loaded: libssl.1.0.0.dylib

前端 未结 20 2488
囚心锁ツ
囚心锁ツ 2020-11-28 21:02

When I try to run the command:

import psycopg2

I get the error:

ImportError: dlopen(/Users/gwulfs/anaconda/lib/python2.7/si         


        
20条回答
  •  渐次进展
    2020-11-28 21:45

    In relation to X.L.'s answer above, I didn't want to use Anaconda when I'm already using pip, so I just gave it the path to the Postgres libraries which worked for me (I'm using PostgreSQL.app on Mac OS 10.10)...

    export DYLD_FALLBACK_LIBRARY_PATH=/Library/PostgreSQL/9.5/lib:$DYLD_FALLBACK_LIBRARY_PATH
    

提交回复
热议问题