Unable to import pygame
See original GitHub issueWhen I run a game in pygame the init.py file is created(the pygame module) and I get the following error:
Traceback (most recent call last):
File "C:\Users\User\Desktop\Γιάννης\python\race\A bit racey.py", line 1, in <module>
import pygame
File "C:\Users\User\AppData\Roaming\Python\Python36\site-packages\pygame\__init__.py", line 133, in <module>
from pygame.base import *
ModuleNotFoundError: No module named 'pygame.base'
The pygame is installed, so the ‘pygame.base’ should exist.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
import pygame fails - python
There is an issue with Pygame being in Python's path. If you are trying to run Pygame through Eclipse like I am. The...
Read more >No module named 'pygame' in Python
The error "Import "pygame" could not be resolved from source Pylance" occurs when the pygame module is not installed or you have selected ......
Read more >I can't import the Pygame module. When I'm trying to ...
The error is because your version of Pygame is not compatible with your version of Python or Pydev. Go to this link and...
Read more >cant import pygame in vscode
I cant get pygame to import in vscode "Unable to import 'pygame'pylint(import-error) ". I tried using pip to install it from my terminal ......
Read more >Unable to import 'pygame'
I'm having some trouble with my pygame import in VS CODE. Everytime that I try to import the pygame, it gets underlined. Even...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hello friend . just do==> pip3 install pygame
@rrraj I had the same issue as you and couldn’t find anything to help me anywhere. I tried out many things and for me the issue was that my python was 32 bit and it couldn’t work with pygame. I uninstalled python and installed a 64 bit version and now everything works well.
Hope this helps.