pip安装第三方包报错:There was a problem confirming the ssl certificate

1 添加--trusted-host  有效

但是每次安装增加此参数,比较麻烦

pip install pymysql -i http://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn

2.创建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
posted @ 2023-02-19 16:56  MasonLee  阅读(117)  评论(0编辑  收藏  举报