Where can I find and install the dependencies for pygame?

后端 未结 8 653
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 13:35

I am relatively new to linux and am trying to install the pygame dev environment for python. When I run the setup.py it says that I need to install the following dependencie

相关标签:
8条回答
  • 2020-12-05 14:08

    Behold, one of the most useful tools on debian-based dsitros:

    apt-get build-dep python-pygame
    

    Installs all the dependences required to build pygame :)

    On Fedora:

    yum-builddep package_name
    
    0 讨论(0)
  • 2020-12-05 14:09

    If you run one of supported Linux distributions (see "Unix Distributions" section), you just install pygame from a repository, and dependencies are installed, too.

    Generally, you need SDL (libsdl and friends), Python, Numpy.

    0 讨论(0)
  • 2020-12-05 14:12

    My list for Arch Linux:

    sudo pacman -Sy sdl_ttf sdl_sound sdl_image sdl_mixer portmidi

    0 讨论(0)
  • 2020-12-05 14:13

    For debian, there is a pre-built package available. See here. You should be able to install it with apt-get or something similar.

    0 讨论(0)
  • 2020-12-05 14:14

    $ sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev

    Or sorted slightly:

    sudo apt-get install \
      python-dev \
      python-numpy \
      subversion \
      ffmpeg \
      libsdl1.2-dev \
      libsdl-image1.2-dev \
      libsdl-mixer1.2-dev \
      libsdl-ttf2.0-dev \
      libavcodec-dev \
      libavformat-dev \
      libportmidi-dev \
      libsmpeg-dev \
      libswscale-dev \
    
    0 讨论(0)
  • 2020-12-05 14:14

    on ubuntu 20.04 as of this date I had the SDL missing error and found a solution only to run into a freetype error then had to reinstall because the --user option in the python3 pip command kept me from accessing the module

    Here is a one line solution that worked for me with python version 3.8.2:

    sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev install libfreetype6-dev && python3 pip -m install -u pygame
    
    0 讨论(0)
提交回复
热议问题