How to Fix The "Module Not Found" Error for Pygame in Under 2 Minutes! [2023]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so you've installed everything got some reference code you try and run it and you get this error let's go through the steps to fix this first make sure python is actually installed correctly for this you can open up your command prompt and type python if you get this info then it means it's installed next check that pip is also installed in the same way type pip and you should get a bunch of info if either of these give you errors then you have to install python go back to python.org download and install it important thing to note here is when the installer runs make sure you click the add to path checkbox with that done now make sure the pi game is actually installed we go back into the command prompt and type pip list and this will show you a list of installed packages scroll through them and look for pygame if it's not there then you need to install it by typing pip install pygame if you've done all that and you still get in the error then it may be your editor if you're in pycharm click on the bottom right and select interpreter settings here you can change the python interpreter that you're using within The Interpreter you can check which packages are installed and you can see that I've got Pi game installed here but if you don't have this you can manually install it by clicking on the plus icon type in pi game and hit install package and you can do the same thing with vs code if you're getting the same error go down to The Interpreter in the bottom right and choose a different interpreter and that's it you should now be able to run your code let me know in the comments which stat was causing problems for you give this video a thumbs up and I'll see you in the next one
Info
Channel: Coding With Russ
Views: 84,956
Rating: undefined out of 5
Keywords: python, module not found, pygame, error, no module named pygame
Id: 0x_MEKr0OJQ
Channel Id: undefined
Length: 1min 30sec (90 seconds)
Published: Sun Jul 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.