Не могу установить pygame для python - PullRequest
0 голосов
/ 06 ноября 2018

Этим утром я попытался установить pygame в командной строке Windows и получил ошибку, подобную этой:

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>

Я не могу понять ошибку. Команда работала раньше, но сейчас она не работает. Я думал, что это ошибка соединения, но я могу без проблем запустить любой веб-сайт. Что мне делать?

1 Ответ

0 голосов
/ 06 ноября 2018

Установить PyGame в Windows можно, посетив pygame.org и загрузив установщик MSI. Это не зависит от pip или anaconda.

Похоже, что проблема, которую вы получаете, связана с сертификатом SSL и не имеет ничего общего с PyGame. Оба метода установки имеют одинаковую проблему с SSL.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...