无法安装pygame [英] Unable to install pygame
问题描述
收集pygame使用缓存的 pygame-1.9.6.tar.gz (3.2 MB)错误:命令出错,退出状态为 1:命令:'c:\users\dell\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize;sys.argv[0] = '"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py'"'"';file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py'"'"';f=getattr(tokenize, '"'"'open'""'"', open)(file);code=f.read().replace('"'"''\r\n'"'"", '"'""'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-m8a9tj8v'cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame
完整输出(17 行):
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py'"'"'; file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-m8a9tj8v'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame
Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\DELL\AppData\Local\Temp\pip-install-y044p4mq\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
推荐答案
安装pygame
:
- 在 Windows 上:
pip install pygame==2.0.0.dev14
- 在 Mac OS 和 Linux 上:
pip3 install pygame==2.0.0.dev14
这篇关于无法安装pygame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!