Python Pip 安装 SSL 错误 749

标签 python ssl pip

  • pip 版本:9.0.1
  • Python版本:3.6.1
  • 操作系统:Win10

描述:

我试图在我的公司笔记本电脑上设置 python 库,但在为任何库运行 pip -install 时遇到 SSL 错误 749。我尝试了其他帖子的一些建议,但没有用。我想错误代码略有不同。

有人可以指导我如何解决 SSL 问题吗?

我运行的内容:

C:\WINDOWS\system32>pip install pandas

Collecting pandas
  Could not fetch URL https://pypi.python.org/simple/pandas/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
  Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas

最佳答案

您必须使用此参数指定证书。

pip --cert /etc/ssl/certs/FOO_Root_CA.pem install pandas

参见:Docs » Reference Guide » pip

如果指定您公司的根证书不起作用,也许 cURL 会起作用:http://curl.haxx.se/ca/cacert.pem

您必须使用 PEM 文件而不是 CRT 文件。如果您有 CRT 文件,则需要将文件转换为 PEM

同时检查:SSL Cert Verification

pip install --trusted-host pypi.python.org pandas

关于Python Pip 安装 SSL 错误 749,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44153143/

相关文章:

python - 将具有可变长度字典列表的字典转换为 pandas 数据帧

authentication - 为什么要使用证书对客户端进行身份验证?

google-app-engine - 为 Google App Engine 转换 pfx 文件

django-crm 安装

python - 如何访问包装在sqlalchemy错误中的psycopg2错误

python - 在有越位规则的语言中,所有语言结构都可以是一流的吗?

python - 使用 Python C API 调用 C 函数两次时出现段错误

wordpress - 使用 https ://时搜索并替换 WordPress

python - 模块未找到错误: No module named 'tensorflow' Vs code

python - 未找到模块错误 : No module named 'chart_studio'