Sep-18-2024, 02:24 AM
I have been unsuccessful installing pygame (but see notes below). Here is what I did:
The thing is, pygame IS already installed! (but there seems to be multiple instances) More notes:
I tried searching for help online, but no helpful (or clear) answers. I fear that there are MULTIPLE problems here, and my system is messed up! I would really appreciate some (clear) help to guide me.
Output:sudo python3 -m pip install -U pygame==2.6.0
The directory '/home/garth/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/garth/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pygame==2.6.0
Downloading https://files.pythonhosted.org/packages/72/49/bd2fcbadb6a55bb24284bad4f530189401c99ffc234d51ba54756a776eb2/pygame-2.6.0.tar.gz (15.8MB)
100% |████████████████████████████████| 15.8MB 46kB/s
Complete output from command python setup.py egg_info:
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
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-n22qqeul/pygame/setup.py", line 426, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/tmp/pip-build-n22qqeul/pygame/buildconfig/config.py", line 234, in main
deps = CFG.main(**kwds, auto_config=auto)
File "/tmp/pip-build-n22qqeul/pygame/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.
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/CompileUbuntu
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n22qqeul/pygame/
The 'error' is the last line. Is this a problem with pip??The thing is, pygame IS already installed! (but there seems to be multiple instances) More notes:
- Mu Editor is using pygame 1.9.4 (Python3), but Geany (with Python2) is using 2.0.3, and 2.6.0 (with Python3) in Thonny.
- Geany is not able to use pygame with Python3 (it only works with Python2)
- I don't want to add to this specific issue (but it might be related): I also cannot 'install' pygame zero (but it TOO is 'installed' since i can use it with Mu Editor). Ultimately, I cannot run pgzrun, or other commands (but AGAIN, Mu can run pygame zero programs).
I tried searching for help online, but no helpful (or clear) answers. I fear that there are MULTIPLE problems here, and my system is messed up! I would really appreciate some (clear) help to guide me.