I used
./configure --prefix=$HOME
make
make install
to install sdl2, after which I tried to install pygame by
cd ../pygame-1.9.1release/
python setup.py install
but I am getting an error:
linuxnx:~/python/library/pygame-1.9.1release> python setup.py install
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
Hunting dependencies...
sh: sdl-config: command not found
WARNING: "sdl-config" failed!
sh: smpeg-config: command not found
WARNING: "smpeg-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
I searched a long time, cause I needed the package for Python Crash Course by Eric Matthes, but couldn't find the answer that would help running
pip install pygame
without errors and finally found 1 line solution that worked for me
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 libfreetype6-dev
ORIGINAL: 2013.10.25
PyGame-1.9.1 was created in 2009 so it still use old SDL 1.2 not new SDL2.
PySDL2 use SDL2
EDIT: 2021.10.17
Question and my original answer is almost 8 years old and it seems author removed PySDL2
from URL in my old answer. He moved code from bitbucket
to github
Using Google I found
And meanwhile PyGame
started to use SDL2
.
See also all releases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With