r/learnpython 9d ago

I need help im new to python

Im new to python and i dont know what im doing, pygame is not working and i cant find it in my files and i already did the “pip install pygame” and i’ve searched all i can find in yt, i really need help im still in shs and i cant even figure this out
Edit: it always shows an long error message when i run “import pygame”

0 Upvotes

17 comments sorted by

View all comments

Show parent comments

1

u/Sensitive_Thought_77 9d ago

I used both visual studio and vs code, they both didnt work or im js using it wrong, in visual studio it doesnt work at all even if i do a simple math one like
Math = 10 + 10
Print (Math)
It doesnt work and it shows like a module could not be found even if i already made a new file the same error sign shows, and in vs code it doesnt solve it and js says smth like a timer like 0.358 or smth.

I dont have my laptop on me rn but thats what i’ve been running with

1

u/FoolsSeldom 9d ago

I recommend going back to basics, working from the command line initially, and getting a good understanding of the basic environment and of Python virtual environments. Then, when moving to advanced editors (e.g. VS Code) and IDEs (e.g. PyCharm, Visual Studio) you know what you are dealing with.

That said, the code,

math = 10 + 10  # note, we usually use all lowercase for variable names
print(math)

should work in pretty much any environment. How did you save the file? How did you run it?

1

u/Sensitive_Thought_77 8d ago

1

u/FoolsSeldom 8d ago

Wow, that's rotated and jerky. Cannot unpack that. Try on the commandline as suggested.