1. 程式人生 > >mac 下pip安裝python三方庫的時候提示 Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate:......

mac 下pip安裝python三方庫的時候提示 Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate:......

題記 留言 -c douban index OS -s att 安裝

有什麽問題記得留言,大家一起分享遇到過的大坑

我這邊是換了一個鏡像就好了,具體操作步驟如下(我是MAC):

~:mkdir .pip

~:cd .pip

~:vi pip.conf

將以下內容放入文件pip.conf中

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/ 
[install]
use-mirrors = true
mirrors = http://pypi.douban.com/simple/ 
trusted-host = pypi.douban.com

down,再去安裝就不會報錯啦,親身體驗結果

python -m pip install --upgrade pip(不要忘記更新一下)

pip install requests (這個包安裝可以安裝成功啦)

網上看到的解決方案(這個方案我沒有操作成功,你可以試一下):

正常安裝的時候我們都是用 pip install 三方庫

如果出現上述錯誤 ,就把命令改成

pip --trusted-host pypi.python.org install 三方庫

mac 下pip安裝python三方庫的時候提示 Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate:......