windows - pip 和受信任的主机
问题描述
我正在尝试使用 Python 3.8.6 在 Windows 10 上安装 PyTorch 1.7.0。简单地输入命令时
pip install torch==1.7+cu101
我得到错误:
'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1124)'))': /whl/torch_stable.html
当我做 :
pip install --trusted-host download.pytorch.org torch==1.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
安装工作完美无缺。
但是,我想:
- 理想情况下,使用简单的
pip
命令来处理它并让 SSL 验证正常工作 pip
通过位于我的虚拟环境中的配置文件来处理它,即/path/to/my/env/pip.conf
不幸的是,有这样的pip.conf
文件:
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
download.pytorch.org
不起作用,似乎被忽略pip
解决方案
推荐阅读
- azure-devops - 有没有办法从 Azure Devops 的代码审查义务中排除特定文件?
- c# - 如何用具有几乎相同结构的另一个对象填充对象?
- javascript - 如何在 nativescript 中获取文本字段值
- android - 如何在特定卡片视图的项目点击时访问回收站视图中的所有卡片视图
- spring-cloud-dataflow - SCDF 数据流服务器 2.4.2 组合任务
- or-tools - 我们可以使用谷歌或工具为最小成本流问题提供范围内的供需值吗
- javascript - 谁能解释这个 Google V8 字节码 CreateObjectLiteral?
- firebase - Firebase 标准事件 | 应用实例限制
- reactjs - 如何在 ReactJS 中使用 var 要求('var')是本地 url?
- node.js - 问题 Utf-8 解码 nodejs - readContinuationByte 处的连续字节无效