When using 3 series with pyenv on Raspberry Pi, the following error may occur even if you run pygame with pip install pygame
.
Collecting pygame
Using cached pygame-1.9.3.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
Hunting dependencies...
WARNING: "sdl-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vvaj67he/pygame/
In such a case, follow the steps below to add what you need.
sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
After that, I think you can normally do pip install pygame
.
Recommended Posts