piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Problem with package: pygame - You system is neon capable but pygame was not built with support for it #432

Closed KevinVanthuyne closed 4 months ago

KevinVanthuyne commented 4 months ago

Package name

pygame

Package version

2.5.2

PyPI URL

https://pypi.org/project/pygame/

piwheels URL

https://www.piwheels.org/project/pygame/

Python version

I am aware this is the issue tracker for a Python package index specifically for Raspberry Pi

I have checked for duplicate issues

I am the maintainer

More information

I installed pygame on my Raspberry Pi 3B+ with the following command, as recommended by the pygame docs:

python3 -m pip3 install -U pygame --user

Which downloads pygame-2.5.2-cp39-cp39-linux_armv7l.whl from piwheels.

When running pygame I get the following warning:

<frozen importlib._boostrap>:228: RuntimeWarning: Your system is neon capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation

pygame 2.5.2 (SDL 2.0.14, Python 3.9.2)

I also ran the extra command to install the necessary dependencies, as indicated on the piwheels website:

sudo apt install libgbm1 libwayland-server0 libxkbcommon0 libopusfile0 libsdl2-ttf-2.0-0 libflac8 libxxf86vm1 libsdl2-mixer-2.0-0 libwayland-client0 libvorbis0a libxrandr2 libmpg123-0 libinstpatch-1.0-2 libsndfile1 libsdl2-2.0-0 libxinerama1 libasyncns0 libxss1 libxfixes3 libopus0 libxrender1 libogg0 libwayland-cursor0 libdrm2 libsdl2-image-2.0-0 libxi6 libmodplug1 libjack0 libvorbisenc2 libwayland-egl1 libvorbisfile3 libxcursor1 libportmidi0 libpulse0 libfluidsynth2

I would not expect a warning from pygame, as it's specifically built for Raspberry Pi. Can this be solved or am I doing something wrong?

bennuttall commented 4 months ago

This is just a warning, not an error, so it should work fine.

neon is an optimisation that only exists on certain Pi models, and we need to build wheels that are compatible with all models. If you notice considerable performance issues, try building pygame yourself with neon activated.

KevinVanthuyne commented 4 months ago

Thanks for clearing that up. I was under the impression that it had a severe impact on performance, but after optimizing my pygame code itself I managed to get upwards of 60 FPS on the Pi instead of only a couple, so it seems that the performance impact is not insurmountable