【发布时间】:2017-03-11 17:58:33
【问题描述】:
我正在尝试使用 pip 将 psycopg2 安装到 virtualenv 并收到以下错误:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
尝试 google lssl 库的 python 并且找不到任何提及此错误的内容。我做错了吗?
pip 8.1.2
python 2.7.10
virtualenv 12.0.7
macos 10.12.1
更新:实际上看起来这个问题是这个问题的副本:Can't install psycopg2 package through pip install... Is this because of Sierra? 该问题的解决方案帮助了我。问题在于缺少 xcode-cli 工具,xcode-select --install 解决了我的问题。
【问题讨论】:
-
尝试安装openssl。我怀疑这会清除它。
-
@DejaVuSansMono 尝试了
pip install pyopenssl。没有变化。