Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6129

pip install pygame not working and i don't know why

$
0
0

On Ubuntu, trying to install pygame using pip within my venv.

This is the full error message thrown when I try:

$ pip install pygameCollecting pygame  Using cached pygame-2.6.0.tar.gz (15.8 MB)  Installing build dependencies ... done  Getting requirements to build wheel ... error  error: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> [53 lines of output]      Skipping Cython compilation      WARNING, No "Setup" File Exists, Running "buildconfig/config.py"      Using UNIX configuration...      /bin/sh: 1: sdl2-config: not found      /bin/sh: 1: sdl2-config: not found      /bin/sh: 1: sdl2-config: not found      /bin/sh: 1: pkg-config: not found      /bin/sh: 1: pkg-config: not found      /bin/sh: 1: pkg-config: not found      /bin/sh: 1: freetype-config: not found      /bin/sh: 1: freetype-config: not found      /bin/sh: 1: freetype-config: not found      Hunting dependencies...      WARNING: "sdl2-config" failed!      WARNING: "pkg-config freetype2" failed!      WARNING: "freetype-config" failed!      ---      For help with compilation see:          https://www.pygame.org/wiki/Compilation      To contribute to pygame development see:          https://www.pygame.org/contribute.html      ---      Traceback (most recent call last):        File "/home/salvadorduran/Documents/Projects/musicplayer/mpEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>          main()        File "/home/salvadorduran/Documents/Projects/musicplayer/mpEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main          json_out['return_val'] = hook(**hook_input['kwargs'])                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/home/salvadorduran/Documents/Projects/musicplayer/mpEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel          return hook(config_settings)                 ^^^^^^^^^^^^^^^^^^^^^        File "/tmp/pip-build-env-1fn_8yi6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel          return self._get_build_requires(config_settings, requirements=[])                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/tmp/pip-build-env-1fn_8yi6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires          self.run_setup()        File "/tmp/pip-build-env-1fn_8yi6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup          super().run_setup(setup_script=setup_script)        File "/tmp/pip-build-env-1fn_8yi6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup          exec(code, locals())        File "<string>", line 426, in <module>        File "/tmp/pip-install-o7k2dau0/pygame_136947bea63141b1b724389631340fca/buildconfig/config.py", line 234, in main          deps = CFG.main(**kwds, auto_config=auto)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/tmp/pip-install-o7k2dau0/pygame_136947bea63141b1b724389631340fca/buildconfig/config_unix.py", line 245, in main          raise RuntimeError('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')      RuntimeError: Unable to run "sdl-config". Please make sure a development version of SDL is installed.      [end of output]  note: This error originates from a subprocess, and is likely not a problem with pip.error: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.

Python version is 3.12.3 and Ubuntu release is 24.04. Have been trying to look for a fix but cannot find one. Any ideas here? This is a recent problem as I did it yesterday with no issues.


Viewing all articles
Browse latest Browse all 6129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>