繁体   English   中英

pip 在命令提示符下安装包时出错

[英]pip error on installing packages on command prompt

您好,我已经安装了 Anaconda/jupyter notebook,但是出现错误

在此处输入图像描述

这是出现的文字

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

尝试以下

pip install pygame==1.9.6release --allow-external pygame --allow-unverified pygame.

看起来您使用的 python 没有编译 ssl 支持( because SSL module is not available )。

由于 pypi.org 使用 SSL,您将无法从那里安装软件包。

我遇到了和你一样的问题。 我尝试了很多东西,只有一个有效。 该问题可能是由Windows\System32文件夹中的 DLL 存档(例如 libcrypto-1_1-x64.dll、libssl-1_1-x64.dll 或其他)引起的。

解决方案是从https://slproweb.com/products/Win32OpenSSL.html安装 openSSL,将 DLL 替换为升级版本。

希望它有效!

大家好,答案是,我没有使用 CMD,而是使用了 Anaconda Powershell 提示,效果很好。 没有 SSl 错误

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM