import psycopg2
2017.02.28补充
改动暂时只对终端有效
若报错 Library not loaded: libssl.1.0.0.dylib,解决方式如下:
Option 2. If for some reason you would like to maintain the current symbolic links in usr/local, run this command in your shell:
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/anaconda/lib/:$DYLD_FALLBACK_LIBRARY_PATH
Just make sure to replace $HOME/anaconda/lib above with the actual lib path. In my case, this was $HOME/miniconda2/envs/ali/lib.
This will only work for the shell/bash session you're currently in. To make the change persistent, add the export statement to your ~/.bash_profile or ~/.bashrc file.
参考资料:
stackoverflow:Import psycopg2 Library not loaded: libssl.1.0.0.dylib
增删环境变量
网友评论