最近下面这几个让我困惑了一段时间
Could not fetch URL https://mirrors.ustc.edu.cn/pypi/web/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852) - skipping 和 You are using pip version 9.0.1, however version 23.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.尝试了很多方法都没有效果
1.刚开始以为是网络问题使用了中科大的源,然后依旧报错
conda config --remove-key channels
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/web/simple
2.后来根据错误提示更新了pip然后还是报错了
之后发现无论是ptchorm还是Anaconda都无法使用pip
就在我打算删除虚拟环境时再下一个的时候看到了一个大佬的博客
大佬给出了一个解决方法
4.创建pip配置pip.ini
(1)在系统目录C:\Users\用户\AppData\Roaming新建pip文件夹;
(2)在pip文件夹下新建pip.ini文件,并写入如下配置:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
尝试后发现什么报错都没有了,把pip正常更新后,在尝试更新库也不在报错
下面是大佬文章的链接
pip安装第三方包报错:There was a problem confirming the ssl certificate - 陌路麒麟 - 博客园 (cnblogs.com)
非常感谢大佬,不然又会很麻烦
希望解救困惑的你