rzwyx 发表于 2024-7-29 09:49:45

ubuntu下安装pygame总是失败,是为啥呢?各位大神

ubuntu:~$ python3 -m pip install -U pygame==2.6.0
Collecting pygame==2.6.0
   
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3xbsttpo/pygame/

rzwyx 发表于 2024-7-29 09:50:29

ubuntu:~$ python3 -m pip install -U pygame==2.6.0
Collecting pygame==2.6.0
Using cached
    Complete output from command python setup.py egg_info:
    Skipping Cython compilation
   
   
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using UNIX configuration...
   
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-3xbsttpo/pygame/setup.py", line 426, in <module>
      buildconfig.config.main(AUTO_CONFIG)
      File "/tmp/pip-build-3xbsttpo/pygame/buildconfig/config.py", line 234, in main
      deps = CFG.main(**kwds, auto_config=auto)
      File "/tmp/pip-build-3xbsttpo/pygame/buildconfig/config_unix.py", line 245, in main
      raise RuntimeError('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
    RuntimeError: Unable to run "sdl-config". Please make sure a development version of SDL is installed.
   
    Hunting dependencies...
    WARNING: "sdl2-config" failed!
    WARNING: "pkg-config freetype2" failed!
    WARNING: "freetype-config" failed!
   
    ---
   
   
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3xbsttpo/pygame/
页: [1]
查看完整版本: ubuntu下安装pygame总是失败,是为啥呢?各位大神