Pip安装EOFError

3

我正在使用Windows 10,并最近更新了Python 3.8。我尝试在新版本上安装pygame,使用了py -m pip install -U pygame --user命令,但是出现了以下错误:

    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\username\AppData\Local\Programs\Python\Python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\username\\AppData\\Local\\Temp\\pip-install-_e3mjg4_\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\username\\AppData\\Local\\Temp\\pip-install-_e3mjg4_\\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 pip-egg-info
         cwd: C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\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-x86"? [Y/n]Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\setup.py", line 194, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\config.py", line 210, in main
        deps = CFG.main(**kwds)
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\config_win.py", line 576, in main
        and download_win_prebuilt.ask(**download_kwargs):
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
        reply = raw_input(
    EOFError: EOF when reading a line
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\username\AppData\Local\Programs\Python\Python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\username\\AppData\\Local\\Temp\\pip-install-_e3mjg4_\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\username\\AppData\\Local\\Temp\\pip-install-_e3mjg4_\\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 pip-egg-info
         cwd: C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\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-x86"? [Y/n]Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\setup.py", line 194, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\config.py", line 210, in main
        deps = CFG.main(**kwds)
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\config_win.py", line 576, in main
        and download_win_prebuilt.ask(**download_kwargs):
      File "C:\Users\username\AppData\Local\Temp\pip-install-_e3mjg4_\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
        reply = raw_input(
    EOFError: EOF when reading a line
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

有人有什么建议吗?我在其他地方找不到任何东西,以前也从未遇到过这种情况。


欢迎来到 Stack Overflow!当您提出一个问题时,请尽量添加最少的内容:输入示例,期望输出示例,您已经尝试过什么,研究了什么以及您卡在哪里。您都尝试了什么呢? - David García Bodego
2
Python 3.8非常新鲜,某些模块可能尚不存在于此版本中。因此最好回到3.7,并等待几个月,直到它得到更好的测试并为该版本创建了一些模块。 - furas
发现了同样的问题。Pygame可以在Python37上安装和运行,但无法在python38上运行。这里也发布了同样的问题:https://superuser.com/questions/1493749/ive-been-trying-to-install-pygame-but-i-keep-getting-this-error?r=SearchResults&newreg=f2062e38a9b048c4bb4b99f4d28746b5 - Abisdad
2个回答

7
欢迎来到Stack Overflow。我们很高兴您能在这里。不幸的是,我认为目前pygame在3.8版本下不太可靠。我建议您降级回3.7版本,并在那里使用pip进行安装。
祝你好运!

运行完美。非常感谢。 - Khalid Saifaldeen

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接