Closed SDRausty closed 7 years ago
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 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 cython
Note 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
A mi no me funciona pygame, pero fabrico aplicaciones (GUI) en termux x11, uso tkinter y pysimplegui, me gustaría que pygame se pudiera ejecutar, por que necesito esa librería para hacer un reproductor de música para termux x11, por el momento e echo una calculadora y una app de dibujo :c
(
@Yisus7u7 Use English on our issue tracker (https://wiki.termux.com/wiki/Community#Rules).
@ Yisus7u7 Utilice el inglés en nuestro rastreador de problemas ( https://wiki.termux.com/wiki/Community#Rules ). It doesn't work for me pygame, but I manufacture applications (GUI) in termux x11, I use tkinter and pysimplegui, I would like pygame to run, because I need that library to make a music player for termux x11, for the moment and I make a calculator and a drawing app: c I would like a few more tools to continue developing apps for the thermal graphics environment, at the moment I limited to tkinter and pysimpleGUI, I would like the pygame library, because if I had it I could make cooler applications, I hope that pygame will add it soon
You can try to install PyGame as in https://www.reddit.com/r/termux/comments/ks6xi4/pygame_on_termux/giek6v4/?utm_source=share&utm_medium=web2x&context=3, assuming build-essential
is installed:
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
python3 setup.py -config -auto -sdl2
python3 setup.py install cython
pygame
won't be provided as package, at least not officially due to issues with cross-compiling native extensions for Python modules.
Thank you very much xeffyr, I will try that construction, now I will put the pygame code to the music player I am making, I hope it can work, thank you very much!
Pd: Another thing I'd like to ask you if it's not too much trouble is zenity, to add graphical interface to the scripts in bash, that would make Termux x11 more useful
@xeffyr I can't seem to install sdl2
, there's no such package
Edit: sdl2 and related packages are present in x11-repo. Make sure you enable that repo before installing. If you haven't, do apt install x11-repo to enable it
.
You can try to install PyGame as in https://www.reddit.com/r/termux/comments/ks6xi4/pygame_on_termux/giek6v4/?utm_source=share&utm_medium=web2x&context=3, assuming
build-essential
is installed: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 python3 setup.py -config -auto -sdl2 python3 setup.py install cython
pygame
won't be provided as package, at least not officially due to issues with cross-compiling native extensions for Python modules.
tried, import pygame is ok, but...mixer is not available...anyone help? @xeffyr You are truely an expert! Great thanks! After pkg install sdl2-mixer, it works.
$ 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:
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