Switch from python 3.10 to python 3.8

Hello, i have python 3.10 and 3.11 installed and i want to switch to python 3.8 to make pygame work so i can exercise for my exams. Does anybody know how i can do that?

thanks

Have you tried downloading and installing Python 3.8 from Python.org?

On python.org is written that there are no files for the 3.8 version

There’s a full set of installers for 3.8.10, the last bugfix release, as I linked in my comment above.

Yes i tried that link, but when choosing to take 3.8 as interpreter, Python says that its invalid

“Choosing” how? What did you try specifically? What do you mean by “Python says”? Where did you see the message and what exactly does it say? Sorry, its impossible to guess at what you mean from the information provided. Please describe step by step, with full screenshots, output and error message, what do you and what happened. Thanks.

I clicked the link on from the top, clicked on Windows installer (64-bit) with the description Recommended. Than i went on the Visual Studio Code, where i clicked on the bottom right on (3.10.9 64-bit) and i selected (Python 3.8.10 64-bit), when trying to run the programmation i wrote, the screen, which normally shows up and where you can play the game, does not show up. Is the 3.8.10 the wrong version to run pygame or did i something wrong? Because i am more a beginner and dont really know what i could do to fix it

As your error message states…

ModuleNotFoundError: No module named 'pygame'

…you haven’t installed Pygame in your Python 3.8 install. Each Python interpreter installation has its own set of packages. Therefore, you need to install pygame (and any other third-party packages you use) for Python 3.8, via either py -3.8 -m pip install pygame on the Windows (not Python) command prompt, or via whatever package installation tooling VSCode has that you’re familiar with.


On another note…

First, as a general rule, always provide the full and complete output, traceback and error message you get as text, not as a screenshot. See a summary and a more complete list of reasons for why showing a mere screenshot of a text-based error is not a good idea.

Second, in cases where you do have to show a screenshot of something that’s a GUI, not text (as was the case for some earlier steps), please take, well, an actual screenshot (with, e.g., Snipping Tool on Windows) rather than a JPEG photograph with your mobile phone camera—you’ll avoid all the cropping, compression, angle, glare, blurryness, pixelation, moire, skew, focus, lens distortion, and all the other issues that make it far harder to read (not to mention its quicker, easier and smaller in size, too).