无法获取URL https://pypi.python.org/simple/xlrd/

时间:2018-10-18 03:37:06

标签: python

当我尝试在cmd中运行此命令pip install xlrd时收到此错误。我以较高的特权使用了cmd,但仍然无济于事。请帮忙。非常感谢。

整个错误:

C:\Users\Rodne>pip install xlrd
Collecting xlrd
  Could not fetch URL https://pypi.python.org/simple/xlrd/: 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 xlrd (from versions: )
No matching distribution found for xlrd
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

我有python 3.6

我尝试了升级,然后发现了什么:

C:\WINDOWS\system32>pip install pip setuptools --upgrade
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
Requirement already up-to-date: pip in c:\users\rodne\appdata\local\programs\python\python36\lib\site-packages
Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
Requirement already up-to-date: setuptools in c:\users\rodne\appdata\local\programs\python\python36\lib\site-packages
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

使用受信任的安装为我提供了这一点:

C:\WINDOWS\system32>pip install --trusted-host pypi.python.org xlrd
Collecting xlrd
  Could not fetch URL https://pypi.python.org/simple/xlrd/: 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 xlrd (from versions: )
No matching distribution found for xlrd
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

1 个答案:

答案 0 :(得分:1)

您可以使pypi.python.orgpypi.orgfiles.pythonhosted.org受信任的主机来解决SSL证书验证问题:

pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org xlrd
相关问题