如何解决在命令提示符下安装软件包时出现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,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,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,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,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错误
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。