Could not fetch URL https://pypi.python.org/simple/pip: problem confirming ssl certificate

今天装完python 2.7.2,然后装pytest,遇到问题如标题:Could not fetch URL https://pypi.python.org/simple/pip: problem confirming ssl certificate

网上试了很多种方法也不行,然后找到这篇文章https://blog.csdn.net/m0_37690319/article/details/79945809

第二个方法试了不行,用了第三种:pip install pytest -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

安装结束测试:pytest,出现

Could not fetch URL https://pypi.python.org/simple/pip: problem confirming ssl certificate

说明安装成功,解决了pip安装模块包时遇到ssl证书没有认证的问题。