Where can I find and install the dependencies for pygame?

26,927

Solution 1

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

Solution 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

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 \

Solution 3

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

Solution 4

this steps work for me on Ubuntu 16.04:

$ 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

$ sudo pip3 install pygame

Solution 5

My list for Arch Linux:

sudo pacman -Sy sdl_ttf sdl_sound sdl_image sdl_mixer portmidi

Share:
26,927
Andy
Author by

Andy

Updated on November 01, 2021

Comments

  • Andy
    Andy over 2 years

    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 dependencies, one of which I found and installed (SDL). However, the others have been more elusive.

    Hunting dependencies...
    sh: smpeg-config: command not found
    WARNING: "smpeg-config" failed!
    SDL     : found 1.2.14
    FONT    : not found
    IMAGE   : not found
    MIXER   : not found
    SMPEG   : not found
    PNG     : not found
    JPEG    : not found
    SCRAP   : found
    PORTMIDI: not found
    PORTTIME: not found
    

    If you could give me some guidance I would appreciate it.

    Thank you.