Pygame installation

Ok, so I spent more than 6 hours trying to do this!

I installed python 2.7 and python 3.3. I can get pygames 2.7 on my mac osx. I downloaded

pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip 

WITH

http://www.pygame.org/ftp/

but when i try

import pygame

in IDLE I get the following error:

Traceback (last last call):
File "", line 1, in import pygame ImportError: No module named pygame

EDIT ** * When I download pygames zip, where do I extract it? Does it matter where it is, so if it's in the downloads folder is it still good?

Thanks for any help!

+1
source share
1 answer

Have you run pygame.py anytime? Python does not know what you want to load when importing pygame. It may be your script, it may be the installed package. Both of them have the same name.

 Rename your script to mygame.py. Delete any other files in the same directory as your script named pygame.py. 

(You do not need to reinstall).

+1
source

All Articles