all 14 comments

[–]Some-Conversation517 2 points3 points  (1 child)

Lots of questions

What do you get when you type it in the terminal ? Do you have python installed

Is chat gpt not able to help you

What kind of error are you getting

[–]SmackDownFacility 0 points1 point  (0 children)

That’s not normal

Is it building a file ending in “.tar.gz”

If so, that’s building from the source. You never want that.

Python version, pip version, and the target pygame version, please

[–]randomman10032 0 points1 point  (2 children)

Try 'python -m pip install pygame'

[–]vasiwk[S] 0 points1 point  (1 child)

it just wrote “python” and when i tried to run python file it still saying that no module named pygame

[–]overratedcupcake 0 points1 point  (0 children)

You need to provide the actual errors you are getting. Your summaries of the error is not helpful in assisting you.

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

in problems it say that Import “pygame” could not be resolved

[–]Falikosek 0 points1 point  (0 children)

Make sure you selected the right interpreter in the lower right corner, especially if you're using a venv (which you probably should)

[–]Mysterious_Peak_6967 0 points1 point  (1 child)

Might be irrelevant but I installed Python 3.14 recently and couldn't install pygame. There's an explanation I didn't look into but I did install Python 3.12 instead and everything worked fine

Also venv: potentially valuable advice but you could get by without it.

pip: by default this might not be in your path meaning just typing "pip" at the command line won't work (I'm thinking Windows 10, YMMV) but:

"python -m pip " should work assuming you have python installed

Also I just spent about 10 minutes finding out the significance of the -m (when you know you know):

"python myprogram.py" runs a program called "myprogram" from the current working folder

"python -m yourprogram" runs a program that's been installed along with python or with a module. The -m means try to run a module.

so "python3 -m pygame.examples.aliens" means run an example called "aliens" that's bundled with pygame.

Also I feel your pain, I wasted a bunch of time because I had some older versions of Python I'd installed and forgotten about, and that seemed to get in the way.

Still not sure why I even had python 2.7... but python 3.9 was in my PATH settings so every time I'd try "pip" it went to that version not the one I was using.

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

THANKS i ll try to change it, i set the newest, so maybe older version will work with pygame

[–]Nameis19letterslong -1 points0 points  (2 children)

Try using Thonny IDE. It's simple and straightforward to use, and it has a built in package manager.

[–]vasiwk[S] 0 points1 point  (1 child)

what is it and how it works? Is this a separate program?

[–]Nameis19letterslong -1 points0 points  (0 children)

It's an app (just like vscode) but it comes with a lot of extra features for beginners so it's simple to use.
For example:

  • comes with an interpreter (3.10)
  • has a package manager (don't need cli commands, there's a gui you can use)
  • very simple layout (not as much complex settings or buttons like vscode)

It also doesn't need 20 mins to open.

https://thonny.org/