![](/img/trans.png)
[英]Building wheel for psycopg2 ... error pip3 install psycopg2?
[英]How to use pip3 install psycopg2?
我在 Mac 上運行“pip3 install psycopg2”時遇到了這個錯誤。
我想第一次安裝 psycopg2。
...
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
...
我試過 pip,從 GitHub 安裝。 然而,兩者都失敗了。
有人能幫助我嗎? 我真的很感激!
只需將psycopg2
版本升級到 2.7.6 即可與python3
一起正常工作:
pip3 install psycopg2==2.7.6
通過瀏覽對我的帖子發表評論的這些很棒的人分享的上述鏈接,我終於得到了工作。
brew upgrade postgresql
sudo pip install psycopg2
謝謝大家的幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.