How to install pygame for dummies?

i am currently attempting to learn python. I am seriously struggling to understand anything. i slightly understand give something a name and what it needs to do but im trying to delve deeper into it so i can try to grasp the concept. im looking at how to install pygame all over the web and everything is going way over my head. :cry:

A recurring issue that I keep observing on this forum is newcomers to Python wanting to learn the language via some more than basic application teaching/learning methodology, i.e., building or working on some Python project before learning the fundamentals. This includes using tools where a more than basic computer literate competency is required.

So that you do not get lost, or feel that everything is over your head, I strongly recommend learning the fundamentals first. Forget about delving into creating some project without understanding the underlying concepts first.

As a Python student myself, I strongly recommend the book:

Learning Python, 5th Edition by Mark Lutz.

Read it chapter by chapter, in a linear manner. Have IDLE open so that you can test small test scripts as you’re following along. You will learn Python at your own pace without feeling that everything is over your head.

1 Like

This is what I’m currently working with. But most of it is still over my full understanding. Mainly because the version of python they use is no longer available for download. I believe that is the majority of my issue.

Disclaimer: I am not familiar with or have I ever read the book that you are showing.

I think that the title says it all.

How can you invent a computer game without learning all of the Pythonic programming principles.
Inventing a computer game is NOT a trivial matter. That is like saying to a first year university student, who’s major is in architecture, let’s design your very first bridge, without having taken all of the math, materials science, mechanical engineering courses, etc.

The book that I am recommending is very thorough. Don’t let the number of pages discourage you. It just proves how comprehensive it is. Every subject, in my opinion, is very well explained. Only a very few times have I had to google a given subject for additional understanding or to complement what is being explained. It begins from a point of view that the reader is a novice to programming. It is just like taking a course in Python. Note that an ebook version is available so that you can have it open on one half of your computer screen while the other half, you can have the IDLE editor open for running test scripts as you are following along. Learn at your own pace.

Windows OS
Use terminal cmd.exe;

  • mkdir myproject
  • cd myproject
  • python -m venv .venv
  • .\.venv\Scripts\activate
  • pip install pygame

if you want to exit virtual environment type deactivate

if you don’t understand the terminology, you can google search or read the book you own :),
googling is a nice skill to have in general.

additional read about virtual environments and pygame;

Have great day,

1 Like

Thanks for the tip! I’ve done a lot of things backwards, I’m a general superintendent without the first bit of schooling. I comprehend the drawings flawlessly, but my dad rased me while working construction. So it came naturally to me. I guess I’ll pause it for now and get the basics.

Much appreciation

Thank you, I will try this.

A quick check online tells me that it refers to Python 3.4. Currently we’re at Python 3.12, although there are some packages that are available only up to Python 3.11.

So I should downgrade so I can use pygames?

You do not have to. First, Python 3.4 is quite old (it was released 10 years ago), and no longer maintained (it became EOL in 2019).
As @MRAB said, the pygame package is compatible with the latest releases of Python, so it should work with whatever Python you choose to work with.
Note that a package installer like pip will choose (by default) the latest package that is compatible with your system, so it will install the right version of pygame for you.

2 Likes

So how do I get it to work? It continues to fail even after downloading several types.

Can you show us exactly what you typed, and what error you encountered?

I will this evening, my pc is at home

If you’re already familiar with that kind of book, try this:
https://automatetheboringstuff.com/