正确设置 pip,避免There was a problem confirming the ssl certificate问题
windows 环境下,python 安装好后,最好将 pip 源换成国内的,同时添加一下信任主机。避免形如:
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=44
3): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local iss
uer certificate (_ssl.c:1123)’))) - skipping
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests
的错误出现。
- 首先执行
pip config set global.extra-index-url http://mirrors.aliyun.com/pypi/simple
- 此时可以看到 pip 自动生成了一个文件,提示:Writing to C:\Users\xxxxxx\AppData\Roaming\pip\pip.ini
- 打开该文件,直接将下列内容覆盖进去:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
extra-index-url = http://pypi.douban.com/simplehttps://pypi.tuna.tsinghua.edu.cn/simplehttp://pypi.mirrors.ustc.edu.cn/simplehttp://pypi.hustunique.com[install]
trusted-host = mirrors.aliyun.compypi.douban.compypi.tuna.tsinghua.edu.cnpypi.mirrors.ustc.edu.cnmirrors.ustc.edu.cnmirrors.bfsu.edu.cnpypi.hustunique.com
- 保存,完成
正确设置 pip,避免There was a problem confirming the ssl certificate问题相关推荐
- Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate
安装jsonpath:>pip install jsonpath 报错:Could not fetch URL https://pypi.org/simple/pip/: There was a ...
- There was a problem confirming the ssl certificate
There was a problem confirming the ssl certificate 在使用pip 或者 爬虫爬取HTTPs时 有时SSL报错 查看最根源的错误是"Can't ...
- There was a problem confirming the ssl certificate ……
在安装一个Python库onetimepass时发生下面的问题: pip install onetimepass Could not fetch URL https://pypi.python.org ...
- OS X EI Captain 下解决 There was a problem confirming the ssl certificate 问题
参考: Problem Confirming the SSL Certificate - OSX OS X EI Captain 下解决 There was a problem confirming ...
- Windows 下使用anaconda虚拟环境pip install 安装pytorch出现报错There was a problem confirming the ssl certificate
一.报错信息 使用anaconda创建的虚拟环境,进入虚拟环境,使用以下命令安装pytorch pip3 install torch torchvision torchaudio --extra-in ...
- 【pip报错】Could not fetch URL https://pypi.org/simple/gast/:There was a problem confirming the ssl cert
pip install -r requirements.txt 问题1: [报错]Could not fetch URL https://pypi.org/simple/gast/: There wa ...
- 使用pip报错:Could not fetch URL https://pypi.org/simple/: There was a problem confirming the ssl certi
** WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after con ...
- pip或pip3安装报错Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming。。。
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate ...
- 已解决Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming
已解决(pip升级报错) WARNING: pip is configured with locations that require TLS/SSL, however the ssl module ...
- python3.7安装pip问题_python3.7安装, 解决pip is configured with locations that require TLS/SSL问题...
1.安装相关依赖 yum install gcc libffi-devel zlib* openssl-devel # libffi-devel zlib-devel bzip2-devel open ...
最新文章
- Codeforces Round #601 (Div. 2)D. Feeding Chicken,二维压一维,几何平面的分配
- iOS培训教程——设置默认语言
- CodeForcesGym 100753B Bounty Hunter II 二分图最小路径覆盖
- Objective-C Runtime
- java-HTMLjavaSkcriptCSSjQueryajax
- Document类型知识大全
- 数据库视频(一)——整体认识
- 图论--最长路--洛谷P1807 最长路_NOI导刊2010提高(07)
- jax-rs/jersey_使用JAX-RS(Jersey)的HTTP状态错误消息响应中的自定义原因短语
- 团队开发里频繁使用 git rebase 来保持树的整洁好吗?
- matlab中值滤波实现
- java 清空文件夹_java 删除文件夹中的所有文件及文件夹
- 服务器装win10系统,win10服务器系统
- 订单流失总金额怎么算_微信新规下增长乏力,裂变到底该怎么做?
- 想要制作好看的壁纸,有CorelDRAW就够啦
- Sketch占满MacBook200G硬盘的解决方法
- 机房综合布线施工主要是几个方面
- dos(cmd)命令
- 矩阵的转置(C语言)
- 微信小程序开发聊天室——实时聊天,支持图片预览