Python Forum

Full Version: Trying to install pygame Mac OS x high sierra
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys.

Trying to install pygame on Mac OSX high sierra with no luck...

Here is the message I get. Would love your help.



13 warnings and 2 errors generated.
---
For help with compilation see:
https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/giladalon/tmp/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/52/fz0j6s5n16qcnnfhr_c36gnw0000gn/T/pip-install-gsdzdcue/pygame/setup.py'"'"'; __file__='"'"'/private/var/folders/52/fz0j6s5n16qcnnfhr_c36gnw0000gn/T/pip-install-gsdzdcue/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/52/fz0j6s5n16qcnnfhr_c36gnw0000gn/T/pip-record-_u8gkp55/install-record.txt --single-version-externally-managed --compile --install-headers /Users/giladalon/tmp/.venv/include/site/python3.9/pygame Check the logs for full command output.
python 3.9 was just released. New versions are often not supported yet by some 3rd party libraries.

often that error is a result of trying to install to a python version not yet compatible by pygame. I have not been keeping track of it lately, but the easiest solution is to install python3.8 and the corresponding pygame for that..
Do you have to compile it? Have you tried pip3 install pygame?