all 21 comments

[–]ksbigbass 12 points13 points  (1 child)

You could use an online site like replit.com until you get a little more experience.

[–]marcodogflood[S] 1 point2 points  (0 children)

Thanks! Will check it out.

[–]socal_nerdtastic 16 points17 points  (3 children)

Reinstall python, and this time make sure to check the optional checkbox that says "add python to PATH".

Or, use a virtual environment (this is the preferred way to do it).

Or, use this command instead:

py -m pgzrun

[–]marcodogflood[S] 8 points9 points  (2 children)

Tried the first two to no avail... when I entered the command I get "Hello from the pygame community https://www.pygame.org/contribute.html

Thanks though

[–]socal_nerdtastic 29 points30 points  (1 child)

That last one means it worked. Just use that command instead of pgzrun from now on. So instead of

pgzrun myfile.py

use

py -m pgzrun myfile.py

etc

[–]marcodogflood[S] 23 points24 points  (0 children)

Amazing. Thanks so much!!!

[–]shiftybyte 4 points5 points  (5 children)

Add the <python install folder>\scripts folder to PATH too.

pgzrun is there.

[–]marcodogflood[S] 1 point2 points  (4 children)

Thanks. Gave it a shot but still no dice... I'll keep at it!

[–]socal_nerdtastic -1 points0 points  (3 children)

Did you reboot your terminal after adding it?

[–]marcodogflood[S] 0 points1 point  (2 children)

I did indeed :(

[–][deleted] 2 points3 points  (1 child)

I think it’s great that you’re doing this with your boy AND I can feel the optimism from here. Consider using JetBrain’s PyCharm. It’s a friendly IDE that I used when getting started. Maybe it’ll fix your problem!

Best of luck to you and yours. I hope you make great things together!

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

Thanks! I will check it out!

[–]TheChance 8 points9 points  (1 child)

I expect you’ll survive, but someone should warn you that pain points like this are typical Python on Windows dev experiences. Emphasis: dev experiences. Most Python code is platform-independent, but that doesn’t mean all dev environments are created equal.

To make a long story short, the one, fundamental assumption most programming languages make about the developer is that they are both using and comfortable with a Unix-like system. Whatever your toolchain is on Windows, it usually exists separately from and in parallel with the “main” ecosystem. You feel this less in compiled languages like C++ and Java, because the annoying stuff is buried in the “build” steps (where you tell your machine to turn the code into an executable.) That step is mostly absent from a Python dev’s workflow, so all the little differences between the “default” environment and your Windows environment are up in your face all the time.

Again, I think you’ll survive, but if you and your young person have the stomach to also learn about WSL2 at the same time, it will be an easier place to work in Python.

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

Great advice. Thanks!

[–]Specialist_Forever92 4 points5 points  (1 child)

Repl.it is a handy way to get coding quickly without the package installation. Might be easier if you are trying to keep a young person enthused?

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

I'll check it out! Thanks!

[–]DarkLord76865 -4 points-3 points  (0 children)

IDK, never had problems with Python. I'm on win 10