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!
Probably
If you omit
--user
the package gets installed into the conda environment, that's better.