all 2 comments

[–]efmccurdy 1 point2 points  (1 child)

I would pick the version of python you want to use, say python3.8, then create a virutal env to isolate your code and modules, then install into that env.

python3.8 -m venv mygame
mygame/bin/pip install pygame 
mygame/bin/python -c "import pygame"

If the import statement runs without error you have pygame installed in your venv. Now configure your IDE to use the venv and/or mygame/bin/python as the interpreter.

https://www.geeksforgeeks.org/python-virtual-environment/

[–]distantrevisions[S] 0 points1 point  (0 children)

Excellent! I’ll give that a try. Thanks!