Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pygame "No module called pygame.base"

When I download pygame-1.9.2b8-cp36-cp36m-win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame I turn it into zip, take the headers in the pygame-1.9.2b8.data folder into pygame34/include/pygame and I put the other pygame file from the zip in the site-packages folder together with pygame-1.9.2b8.data as any tutorial shows, I always get this error:

Traceback (most recent call last):
  File "C:/Users/andsa/PycharmProjects/THIS WORKS ANDREAS/Games.py", line 1, in <module> 
    import pygame
  File "C:\Python34\lib\site-packages\pygame\__init__.py", line 141, in <module>
    from pygame.base import *
ImportError: No module named 'pygame.base'

EDIT: I use python 3.4.5, I have tried both python and pygame 64 and 32 bit but i still get this error

like image 570
Andreas Sandberg Avatar asked Mar 11 '23 20:03

Andreas Sandberg


1 Answers

This error bugged me for months, what i did was:

  1. Uninstalled the package

    pip3 uninstall pygame

  2. Purged the pip cache

    pip cache purge

  3. Finally...Reinstalled pygame using pip3

    pip3 install pygame

Worked like a charm :)

like image 129
Dipanshu Shukla Avatar answered Mar 23 '23 04:03

Dipanshu Shukla