安装pygame错误
(py_game) C:\Users\lenovo\PycharmProjects\untitled2>pip install pygame
Collecting pygame
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04B72F40>, 'C
onnection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04A3A208>, 'C
onnection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04B97898>, 'C
onnection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04B97A18>, 'C
onnection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04B97838>, 'C
onnection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c
8094d6441db2be/pygame-1.9.6.tar.gz (Caused by ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04B979B8>, 'Connection to files.pythonhosted.org timed out. (connect timeout
=15)'))
正在回答
同学,你好。报连接超时错误,pip安装时默认使用国外源下载,同学可以选择国内的下载源来进行安装。如清华大学下载源:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygame。
如果解决了你的疑惑,请采纳,祝学习愉快~
- 参与学习 人
- 提交作业 2727 份
- 解答问题 8160 个
想要进入Python Web、爬虫、人工智能等高薪领域,你需要掌握本阶段的Python基础知识,课程安排带你高效学习轻松入门,学完你也能听得懂Python工程师的行业梗。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星