2

This morning I tried install pygame on windows command prompt and get an error like this:

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>

So I tried running anaconda to install pygame, but I get another error.

(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>

I can't understand the error.The command was working before but it doesn't work now.I thought it is connection error but I can run any website smoothly.What should I do?

Cyphall
  • 348
  • 1
  • 10
Chin Hong Tan
  • 177
  • 1
  • 10

1 Answers1

0

It's possible to install PyGame on Windows by visiting pygame.org and downloading an .MSI installer. This does not rely on pip or anaconda.

The issue you are receiving seems to be an SSL certificate problem, and is nothing to do with PyGame. Both your installation methods are having the same problem with SSL.

Kingsley
  • 14,398
  • 5
  • 31
  • 53
  • So that means it is not possible for me to install pygame via pip?Or is there any way to solve the SSL certificate problem? – Chin Hong Tan Nov 06 '18 at 11:32
  • @ChinHongTan This may sounds like a stupid question, but is your system clock set correctly ? – Cyphall Nov 06 '18 at 15:31
  • @ChinHongTan - This could be a local SSL certificate chain problem, or a remote proxy issue, etc. It's mentioned somewhat in https://stackoverflow.com/questions/24372942/ssl-error-unable-to-get-local-issuer-certificate . Basically it means the remote server's certificate can't be verified, so the download can't be trusted to be coming from the origin you expect. – Kingsley Nov 06 '18 at 21:29