无法为python安装pygame

时间:2018-11-06 04:33:06

标签: python pygame anaconda command-prompt

今天早上,我尝试在Windows命令提示符下安装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>

所以我尝试运行anaconda来安装pygame,但又遇到另一个错误。

ec2-user

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

1 个答案:

答案 0 :(得分:1)

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

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