Python error ImportError No module named pygame locals

0 votes

I'm trying to build some random game on python as apart of my project. It's a very simple game but I keep getting me the following error:

ImportError: No module named pygame.locals

How do I get rid of it?

Jun 18, 2019 in Python by Harsha

1 answer to this question.

0 votes

You need to download and install the pygame module provided by python. 

To download and install on Pycharm, follow these steps:

Goto File -> Settings -> click on the tiny plus sign on the right top corner as shown below.

You'll see a search tab, type the module name there. In your case its pygame.

Finally, click on install package and you're good to go!

answered Jun 18, 2019 by Greg
Error in python interpreter '+' sigh
"Error loading package"


Go to Settings/Appearance and Behavior/System Settings/HTTP Proxy and check Auto-detect proxy settings.

Related Questions In Python

0 votes
1 answer

Package installed but still says "ImportError: No module named pygame.locals"

So Harsha, you Import the module first ...READ MORE

answered Jun 18, 2019 in Python by Varsha
0 votes
1 answer
0 votes
2 answers

Python error "ImportError: No module named 'tkinter'"

sudo apt-get install python3-tk Then, >> import tkinter # ...READ MORE

answered Nov 9, 2019 in Python by Icetutor
• 160 points
0 votes
1 answer

Python error "ImportError: No module named SpeechRecognition"

Hi @Hannah, replace  import SpeechRecognition as sr with import speech_recognition ...READ MORE

answered Oct 3, 2019 in Python by Yamini
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,421 views
0 votes
0 answers
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
0 votes
2 answers

Python error " import requests ImportError: No module named requests"

Hello, Open Cmd or Powershell as Admin. type pip ...READ MORE

answered Nov 28, 2020 in Python by Rohan
• 200 points
0 votes
1 answer

No module named urllib3

It is possible that either urllib3 is ...READ MORE

answered Jan 24, 2019 in Python by SDeb
• 13,300 points