If you're new to python and on Windows (from what I can tell), I would recommend taking a bit of a step back before diving into pygame and learn how basic python functions first. It will help you immensely once you want to make a game.
I apologize for the lack of info! I tried running it through the console built into VS. Said it already had it installed! And i already had PyCharm installed but havent tried getting importing pygame!
Might be irrelevant now but when I tried to install pygame on 3.14 I couldn't so I installed Python 3.12 instead and pygame installed fine.
Also a bunch of other problems including having a much older Python installed, also I'm in two minds about "venv", it works and I can have modules installed specifically for a project but I also think you should be able to just add pygame to your regular Python install and not worry about it.
In terminal write pip show pygame, then go to Environment Variables and ensure that the Location: from the pip show pygame command is on Path under System Variables in the Environment Variables window.
6
u/FleshLogic Feb 12 '26
If you're new to python and on Windows (from what I can tell), I would recommend taking a bit of a step back before diving into pygame and learn how basic python functions first. It will help you immensely once you want to make a game.
2
u/bird_feeder_bird Feb 12 '26
Did you pip install?
2
u/Mc-gabys Feb 12 '26
Hey, what version of Python do you have installed? Are you on Windows or another OS?
2
u/Markuslw Feb 13 '26 edited Feb 13 '26
In terminal write
pip show pygame, then go to Environment Variables and ensure that theLocation:from thepip show pygamecommand is onPathunderSystem Variablesin the Environment Variables window.1
u/crab_clubber Feb 15 '26
In command prompt or powershell
cd “your project directory”
python -m venv .venv
.venv/Scripts/activate
pip install pygame
Basically, creates a virtual environment for your project which handles dependencies/libraries like pygame a lot easier. Hopefully it works.
.venv/Scripts/activate activates your virtual environment. Make sure it’s active when you run the script as well.
0
u/lifeintel9 Feb 12 '26
Seeing this, I think you MIGHT have
pip installin your "C:\Users\user" (USERPROFILE) folder instead of your "Downloads" folder.Try :
Then import pygame in your project.