首页 > 解决方案 > 无法在 Windows 10 的命令提示符/PowerShell 中更新或使用 pip

问题描述

当我尝试使用 pip 时,总是会出现这个问题:

C:\Users\myname\OneDrive\Documents\GitHub\NeuralNetworks>pip install --upgrade pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Requirement already up-to-date: pip in c:\users\eriku\anaconda3\lib\site-packages (19.2.3)
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

所以在这里我只是简单地输入命令来升级/更新 pip,但不知何故有“无连接”/和 SSL/HTML 错误,有没有人遇到过类似的问题?我尝试安装 TensorFlow,但尤其是它不起作用。我跑

-Windows 10
-16GB RAM
-2 Graphics Cards (One internal graphics [UHD Graphics 620] card and a normal card [GTX1050] )
-A quad-core CPU (Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz)

我知道这是一个软件问题,但我仍在发布硬件,它可能会有所帮助。

刚刚安装了 Linux,我正在双启动,但是这个问题只发生在 Windows 上,Git Bash 似乎在这两个操作系统上都可以工作。Docker Toolbox 已成功安装,虚拟化已启用,Python 已安装...我可以/曾经能够运行 python 命令/我能够键入“python”,然后在提示符下在 python 中编码,但不能制作任何其他 python命令,非常混乱。

C:\Users\myname\OneDrive\Documents\GitHub\NeuralNetworks>python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)]

不用担心日期,它实际上是 2019 年 10 月 10 日上午 11:02,但是....我是双启动,所以你知道!

很高兴有任何帮助。

标签: sslpip

解决方案


推荐阅读