我正在使用python 3.8.1,我想安装pygame来制作井字游戏。我是初学者,但不断收到错误消息Command "python setup.py egg_info" failed with error code 1 in C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\
我在pycharm中使用终端,并键入pip install pygame==2.0.0.dev6
,每次得到相同结果时,我也只尝试了pip install pygame
。这真令人沮丧...
编辑:这是完整的反馈 `收集pygame == 2.0.0.dev6 正在下载
https://files.pythonhosted.org/packages/c5/a0/63f9ca836e6a08e560f1ef3f2535ffb46bfdad2abb093dd097dae252be28/pygame-2.0.0.dev6.tar.gz(3.7MB) 100%|████████████████████████████████|| 3.7MB 378kB /秒 来自命令python setup.py egg_info的完整输出:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\setup.py", line 258, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\config.py", line 208, in main
deps = CFG.main(**kwds)
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\bookr\AppData\Local\Temp\pip-install-qt5y1n20\pygame\buildconfig\download_win_prebuilt.py", line 17, in download_sha1_unzip
import requests
ModuleNotFoundError: No module named 'requests'
Making dir :prebuilt_downloads:
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
命令“ python setup.py egg_info”失败,错误代码为1:C:\ Users \ bookr \ AppData \ Local \ Temp \ pip-install-qt5y1n20 \ pygame
`