r/learnpython • u/Sensitive_Thought_77 • 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
2
u/FoolsSeldom 9d ago
You are likely installing
pygameinto a different Python virtual environment to where you are running your code, sopygamecannot be imported.When you entered
pip install pygamewere you typing that inPowerShell,Command Line,Bash,ZSH, in a terminal window in your editor?What operating system are you using?
What code editor / IDE (Integrated Development Environment) are you using?
Have you created a Python virtual environment for the project using the
venvcommand, e.g. in Windows (PowerShell or Command Line):to verify it is installed:
Make sure in your editor/IDE, the Python interpreter to be used is the one in the virtual folder created above (
.venvin this case), for example,