ssl - 无法在 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,但是....我是双启动,所以你知道!
很高兴有任何帮助。
解决方案
推荐阅读
- c# - HTTP Post 请求失败并在 OWIN 自主机 Web api 服务器中出现内部服务器错误
- r - ggpubr,让 stat_compare_means 使用“填充”变量
- node.js - NodeJS - 使用 pdf-image、bluebird、hi-base64、gm 和 image-magic 在 base 64 中进行图像转换结果反转颜色
- kotlin - 我收到一个我不知道如何解决的编译时错误:错误:期望属性名称或接收器类型 - Kotlin
- visual-studio-code - 如何在 Visual Studio 代码中添加运行按钮?
- python - Django 进行迁移返回 ModuleNotFoundError
- c++-amp - 有没有办法使用 C++ 修改 parallel_for_each() 中的局部变量
- android - 如何向 BT 耳机发送 AT 命令
- c - 在 C 中的矩阵中存储大量 CSV 值
- apache-zookeeper - 有没有办法让zookeeper领导下台