python - 在命令提示符下安装软件包时出现 pip 错误
问题描述
嗨,我已经安装了 Anaconda/jupyter 笔记本,但出现错误
这是出现的文字
C:\Users\DELL>pip install pygame
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/pygame/
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/pygame/
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/pygame/
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/pygame/
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/pygame/
Could not fetch URL https://pypi.org/simple/pygame/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pygame/
(Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pygame (from versions: none)
ERROR: No matching distribution found for pygame
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
解决方案
我和你面临同样的问题。我尝试了很多东西,只有一个有效。该问题可能是由Windows\System32文件夹中的 DLL 档案(例如 libcrypto-1_1-x64.dll 、 libssl-1_1-x64.dll 或其他)引起的。
解决方案是从https://slproweb.com/products/Win32OpenSSL.html安装 openSSL ,将 DLL 替换为升级版本。
希望它的工作!
推荐阅读
- android - Android应用程序和库的奇怪问题
- reactjs - 使用分块对 React SSR 应用程序进行 A/B 测试
- java - 无法使用 IntelliJ 应用程序配置找到或加载主类
- scala - 将一列的总和转换为“val”(变量)
- javascript - 如何获得关于悬停在 SVG 圆圈上的工具提示
- python - 从仅包含 1 列的 csv 创建数据框。像这样的数据:[1,2,3], 0, 100
- python - 有没有更短的方法来初始化这个循环?
- oracle - 如何在 Method_4 中设置动态参数?
- python-3.x - 用 NaN 替换字符串中的值
- python - 如何使用字符和数字字典绘制饼图