DEV Community

Cover image for Installing Pygame
Vivian Dai
Vivian Dai

Posted on

Installing Pygame

Pygame can be somewhat difficult to install for a beginner so here are scripts that can install Pygame more easily (download the right file for your operating system then double click on the file):

It's preferable if the user has admin permissions.

Other Common Problems

Naming a File pygame.py

naming file error

AttributeError: module 'pygame' has no attribute 'init'

This kind of problem occurs when there is a file in the same folder as the file you're trying to run called pygame.py. When importing, Python will first check the files in the folder to see if there's a module written by the user before checking elsewhere—basically don't name files pygame.py

Conclusion

Hopefully this made it easier to install Pygame, happy coding!

Discussion (0)