Python install wxpy出現exception - SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

python -m pip install wxpy
Collecting wxpy
  Could not fetch URL https://pypi.python.org/simple/wxpy/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) - skipping
  Could not find a version that satisfies the requirement wxpy (from versions: )
No matching distribution found for wxpy

如上錯誤信息

解決方案:

1.第一種嘗試方式:加上--trusted-host 執行 pip --trusted-host pypi.python.org install xxx 結果是:失敗

2.第二種嘗試:發現是url的來源的問題,換成了國內的pip源就可以正常安裝了,我使用的是:pip install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com,結果:失敗

1)http://mirrors.aliyun.com/pypi/simple/ 阿里雲

2)https://pypi.mirrors.ustc.edu.cn/simple/  中國科技大學

3) http://pypi.douban.com/simple/  豆瓣

4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清華大學

5)  http://pypi.mirrors.ustc.edu.cn/simple/ 中國科學技術大學

3.第三種嘗試:思考了一下混合了兩個問題的解決方法,使用命令:

python -m pip install wxpy  --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org

結果:成功

成功

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章