【问题标题】:Pygame installation error: dependencies not found?Pygame安装错误:找不到依赖项?
【发布时间】:2020-03-17 16:45:33
【问题描述】:

当我输入命令“pip3 install pygame”时,结果如下:

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9qmorw2a/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9qmorw2a/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 /tmp/pip-install-9qmorw2a/pygame/pip-egg-info
         cwd: /tmp/pip-install-9qmorw2a/pygame/
    Complete output (18 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using UNIX configuration...
    
    
    Hunting dependencies...
    SDL     : found 1.2.15
    FONT    : not found
    IMAGE   : not found
    MIXER   : not found
    PNG     : found
    JPEG    : found
    SCRAP   : found
    PORTMIDI: found
    PORTTIME: found
    FREETYPE: found 21.0.15
    Missing dependencies
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我该如何解决这个问题?

【问题讨论】:

  • PyGame 可能有一些版本问题,你使用的是什么 python 版本? 3.8.2?
  • 我使用的是python 3.8.2

标签: python-3.x installation pygame


【解决方案1】:

PyGame 与 python 3.8 版本不兼容,所以请尝试一些旧版本。

使用 3.6.8 它将支持所有可用于 python 的库。

【讨论】:

    【解决方案2】:

    试试这个:

    sudo apt install python3-pygame
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-23
      • 1970-01-01
      • 2019-03-09
      • 1970-01-01
      • 2020-08-29
      • 1970-01-01
      相关资源
      最近更新 更多