Can';t安装pygame for python

Can';t安装pygame for python,python,pygame,anaconda,command-prompt,Python,Pygame,Anaconda,Command Prompt,今天早上,我尝试在windows命令提示符下安装pygame,但出现如下错误: Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\User>pip install pygame Collecting pygame Retrying (Retry(total=4, connect=None, read=None, redirect=None

今天早上,我尝试在windows命令提示符下安装pygame,但出现如下错误:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\User>pip install pygame
Collecting pygame
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /simple/pygame/
  Could not fetch URL https://pypi.org/simple/pygame/: There was a problem confi
rming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max r
etries exceeded with url: /simple/pygame/ (Caused by SSLError(SSLCertVerificatio
nError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to
 get local issuer certificate (_ssl.c:1045)'))) - skipping
  Could not find a version that satisfies the requirement pygame (from versions:
 )
No matching distribution found for pygame

C:\Users\User>
所以我试着运行anaconda来安装pygame,但我遇到了另一个错误

(base) C:\Users\User>conda install -c cogsci pygame
Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/pro/win-64/repodata.json.bz2>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.


If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443
): Max retries exceeded with url: /pkgs/pro/win-64/repodata.json.bz2 (Caused by
SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_ce
rtificate\', \'certificate verify failed\')])")))'))



(base) C:\Users\User>
(基本)C:\Users\User>conda安装-C cogsci pygame
解决环境:失败
CondaHttPeror:url的HTTP 000连接失败
已过去:-
尝试检索此URL时发生HTTP错误。
HTTP错误通常是断断续续的,一次简单的重试就可以让您上路。
如果您当前的网络https://www.anaconda.com 已阻止,请存档
网络工程团队的支持请求。
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\',port=443
):url:/pkgs/pro/win-64/repodata.json.bz2超过最大重试次数(由
SSLError(SSLError(“错误的握手:错误([(\'SSL例程\',\'ssl3\'u get\'u server\)
证书\',\'certificate Verification failed\')])))”)))
(基本)C:\Users\User>

我无法理解该错误。该命令以前有效,但现在无效。我认为这是连接错误,但我可以顺利运行任何网站。我该怎么办?

通过访问并下载.MSI安装程序,可以在Windows上安装PyGame。这不依赖于
pip
anaconda


您收到的问题似乎是SSL证书问题,与PyGame无关。您的两种安装方法都有相同的SSL问题。

这意味着我不可能通过pip安装pygame?或者有没有办法解决SSL证书问题?@ChinHongTan这听起来可能是个愚蠢的问题,但是您的系统时钟设置是否正确?@ChinHongTan-这可能是本地SSL证书链问题,或者是远程代理问题,等等。这在中有所提及。基本上,这意味着远程服务器的证书无法验证,因此不能相信下载来自您期望的来源。