Please make sure you already install the Anaconda.
I will create a virtual environment with anaconda and install the pygame in this virtual environment.
- First create a virtual environment called pygame and install the Python 3.6 version.
conda create --name pygame python=3.6
- Change to the pygame virtual environment.
conda activate pygame
- Install pygame
python3 -m pip install -U pygame --user
- Test pygame
python3 -m pygame.examples.aliens
If it works, you are ready to go!
Worked perfectly fine, if you get this error: missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun ,I would suggest following instructions on: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/