EDIT: I'm on MSYS2, that might be an important detail.
I'm trying to install the Pygame module. I tried both the command in the title and pip3 install pygame==2.0.0 It gives me the exact same error
Downloading pygame-2.0.0.tar.gz (5.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 5.7 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: line 1: pkg-config: command not found
/bin/sh: line 1: pkg-config: command not found
/bin/sh: line 1: pkg-config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-vc2ohndm/pygame_606c8c39849546738a2efec90a6788f2/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/tmp/pip-install-vc2ohndm/pygame_606c8c39849546738a2efec90a6788f2/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/tmp/pip-install-vc2ohndm/pygame_606c8c39849546738a2efec90a6788f2/buildconfig/config_unix.py", line 222, in main
DEPS.append(find_freetype())
File "/tmp/pip-install-vc2ohndm/pygame_606c8c39849546738a2efec90a6788f2/buildconfig/config_unix.py", line 177, in find_freetype
pkg_config = DependencyProg(
File "/tmp/pip-install-vc2ohndm/pygame_606c8c39849546738a2efec90a6788f2/buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range
Hunting dependencies...
---
For help with compilation see:
https://www.pygame.org/wiki/Compilation
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I tried installing/upgrading setuptools, and pip. Still doesn't work.
Is there something I didn't do?
And after doing some things like downgrading pip, I get these errors.
gcc.exe: warning: /W3: linker input file unused because linking not done
gcc.exe: error: /W3: linker input file not found: No such file or directory
gcc.exe: warning: /wd4142: linker input file unused because linking not done
gcc.exe: error: /wd4142: linker input file not found: No such file or directory
gcc.exe: warning: /wd4996: linker input file unused because linking not done
gcc.exe: error: /wd4996: linker input file not found: No such file or directory
error: command 'C:\\msys64\\mingw64\\bin/gcc.exe' failed with exit code 1
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
ERROR: Command errored out with exit status 1: C:/msys64/mingw64/bin/python.exe -u -c 'import io, os
, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:/Users/*mydir*/AppData/Local/Temp/pip-install-v85l6
05a/pygame_298d2ee7e2ce4c4abbe00a88f916be42/setup.py'"'"'; __file__='"'"'C:/Users/*mydir*/AppData/Loc
al/Temp/pip-install-v85l605a/pygame_298d2ee7e2ce4c4abbe00a88f916be42/setup.py'"'"';f = getattr(token
ize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptoo
ls import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(
compile(code, __file__, '"'"'exec'"'"'))' install --record C:/Users/*mydir*/AppData/Local/Temp/pip-re
cord-9j53j7hv/install-record.txt --single-version-externally-managed --compile --install-headers C:/
msys64/mingw64/include/python3.10/pygame Check the logs for full command output.