termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.29k stars 3.06k forks source link

pip install pygame ERROR #1411

Closed SDRausty closed 7 years ago

SDRausty commented 7 years ago

$ 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

Auxilus commented 7 years ago

It needs sdl-dev, libsdl-dev which we dont have in repo

SDRausty commented 7 years ago

https://www.pygame.org/news I just got word of it through Termux. Seems like a grand addition https://github.com/pygame/ 👍

SDRausty commented 7 years ago

@fornwall can you please state a little bit behind your choice to close this issue?

SDRausty commented 7 years ago

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?

Neo-Oli commented 7 years ago

pygame can't work because it's a GUI-Program. Termux only supports Terminal applications.

SDRausty commented 7 years ago

@Neo-Oli Thank you for your time and attention.

ghost commented 6 years ago

@Neo-Oli How about some of pygame modules that doesn't require GUI like pygame.mixer for audio?

Marchantia1 commented 5 years ago

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.)

MikeTheWatchGuy commented 5 years ago

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.

PyGame Space

s33wagz commented 5 years ago

@Neo-Oli https://github.com/termux/termux-packages/issues/3675#issuecomment-508979630

interstellarcg commented 4 years ago

@Neo-Oli it can work..., just install vncserver and then use vncviewer to connect

ghost commented 4 years ago

it can work...,

You are replying to comment posted in 2017y when GUI support was not available...

duskygloom commented 4 years ago

How am I supposed to install pygame? I still can't figure that out... I have xfce installed

rebinsilva commented 4 years ago

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.

duskygloom commented 4 years ago

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

Yisus7u7 commented 3 years ago

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

( Screenshot_20210123-125553

ghost commented 3 years ago

@Yisus7u7 Use English on our issue tracker (https://wiki.termux.com/wiki/Community#Rules).

Yisus7u7 commented 3 years ago

@ 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 Screenshot_20210122-234247

ghost commented 3 years ago

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.

Yisus7u7 commented 3 years ago

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

Qwerty-Space commented 3 years ago

@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.

plr0201 commented 3 years ago

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.