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
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
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.
My list for Arch Linux:
sudo pacman -Sy sdl_ttf sdl_sound sdl_image sdl_mixer portmidi
For debian, there is a pre-built package available. See here. You should be able to install it with apt-get
or something similar.
$ 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 \
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