- 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
或
pip install --trusted-host pypi.python.org pandas
关于Python Pip 安装 SSL 错误 749,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44153143/