$ pip install pygame
Collecting pygame
Downloading pygame-1.9.3.tar.gz (3.0MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 3.0MB 111kB/s
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
/data/data/com.termux/files/usr/bin/sh: 1: sdl-config: not found
/data/data/com.termux/files/usr/bin/sh: 1: sdl-config: not found
/data/data/com.termux/files/usr/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 /data/data/com.termux/files/usr/tmp/pip-build-xksugyfo/pygame/
$ pip install sdl-config
Collecting sdl-config
Could not find a version that satisfies the requirement sdl-config (from versions: )
No matching distribution found for sdl-config
It needs sdl-dev, libsdl-dev which we dont have in repo
https://www.pygame.org/news I just got word of it through Termux. Seems like a grand addition https://github.com/pygame/ 馃憤
@fornwall can you please state a little bit behind your choice to close this issue?
I'm not too concerned myself, since I was merely filling in top ten search results for https://wiki.termux.com/wiki/List_of_Python_packages_known_to_work It did install, so I posted this issue. This program ran into errors. Can you please suggest a course of resolution?
pygame is active and has 100+ 馃専 stars https://wiki.termux.com/wiki/Package_Management#Package_requests
It seems to fullfil necessary requirements for inclusion. However, if Admin @fornwall beg to differ, can a course of resolution be issued here please?
pygame can't work because it's a GUI-Program. Termux only supports Terminal applications.
@Neo-Oli Thank you for your time and attention.
@Neo-Oli How about some of pygame modules that doesn't require GUI like pygame.mixer for audio?
Got here with the same request as momozor -- wishing to run a python program that uses pygame, but only for its sound infrastructure, not the GUI. (Just noting -- no idea how feasible it would be to 'isolate' this.)
I'm using Termux to develop GUI based programs using PySimpleGUIWeb.
The user connects with the application using a Web Browser.
The reason I'm trying to install PyGame on termux is that I am capable of running it inside of my window in a browser.
Here's an example of PyGame running in my PySimpleGUIWeb program, connecting to it from my PC.
The GUI buttons you see on the bottom are not supplied by PyGame, but instead by PySimpleGUIWeb.

@Neo-Oli https://github.com/termux/termux-packages/issues/3675#issuecomment-508979630
@Neo-Oli it can work...,
just install vncserver
and then use vncviewer to connect
it can work...,
You are replying to comment posted in 2017y when GUI support was not available...
How am I supposed to install pygame? I still can't figure that out... I have xfce installed
How am I supposed to install pygame? I still can't figure that out... I have xfce installed
This worked for me:
$ pkg install sdl2 sdl2-image sdl2-ttf wget xorgproto
$ pip install cython
$ wget https://www.pygame.org/ftp/pygame-1.9.6.tar.gz
$ tar -xzf pygame-1.9.6.tar.gz
$ cd pygame-1.9.6.tar.gz
$ python3 setup.py -config -auto -sdl2
$ python3 setup.py install cython
Note that this will not install porttime, so anything that involves midi will not work.
How am I supposed to install pygame? I still can't figure that out... I have xfce installed
This worked for me:
$ pkg install sdl2 sdl2-image sdl2-ttf wget xorgproto
$ pip install cython
$ wget https://www.pygame.org/ftp/pygame-1.9.6.tar.gz
$ tar -xzf pygame-1.9.6.tar.gz
$ cd pygame-1.9.6.tar.gz
$ python3 setup.py -config -auto -sdl2
$ python3 setup.py install cythonNote that this will not install porttime, so anything that involves midi will not work.
It worked fine... But since pygame-1.9.6.tar.gz is not a folder, the cd statement had to be changed to cd pygame-1.9.6 instead
Most helpful comment
@Neo-Oli How about some of pygame modules that doesn't require GUI like pygame.mixer for audio?