安裝一些插件,遇到報錯
Could not fetch URL https://pypi.org/simple/pytest-pycodestyle/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pytest-pycodestyle/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)'))) - skipping
解決辦法:
pip install 插件名 -i 國內鏡像地址 http://pypi.douban.com/simple --trusted-host pypi.douban.com,
舉例:
pip install pytest -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/ 中國科學技術大學