Jump to content


Help! Pygame Is Still Not Working - And Yes I Have Read The Other Threads

  • Please log in to reply
2 replies to this topic

#1 j.e.k.


    New Member

  • Members
  • Pip
  • 1 posts

Posted 16 March 2011 - 07:39 PM

I uninstalled Python 3.2 and installed Python 3.1 like it was advised below.

I still get this when I try to run a program that uses Pygame (pg 221):

Traceback (most recent call last):
File "C:\Users\JohnKrantz\Desktop\python projects\sounds.py", line 1, in <module>
import pygame.mixer
ImportError: No module named pygame.mixer

What am I doing wrong?

The Pygame website is extremely unhelpful for beginners, I'm not sure why we would be expected to rely on it. (i.e., what the heck is a "Windows Binary"?)

The Head First website is not any help either: "The Pygame website has a downloadable installer for Windows that works with Python 3. Simply download, double-click to install and you're golden. "

Well I did that and no, I'm not even close to golden. The installer didn't do anything. There are no new programs under "All Programs", and I just have some folders on my desktop with a lot of python code in it that Python doesnt seem to recognize even when I copy them into the same folder as the programs that use them.

Why is installing pygame so damn hard? Can anyone help a noob?

#2 paulbarry


    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 306 posts

Posted 17 March 2011 - 07:59 AM

I'm sorry to hear that you are having trouble.

It helps if you can decipher the PyGame file naming conventions. Here is the link you'll need to the Python 3.1-specific version of the PyGame download:


which is the Windows 32-bit compatible version of PyGame (win32) for Python 3.1 (py3.1). Note that trying this with anything other than the 32-bit version of Python for Windows, here:


is not guaranteed to work. So, all bets are off if you are running Python 3.2 and (also) all bets are off if you try to install the 32-bit PyGame onto 64-bit Python 3.1.

Both of these downloads (PyGame and Python) are Microsoft Windows self-extracting installers (.msi), so they should download, run and install without a hitch. Once done, you should be able to run the code in the book without the compatibility issues you report. FYI: these are the versions that David and I tested on when working on that and later chapters.

I hope this helps.


#3 arbwar


    New Member

  • Members
  • Pip
  • 2 posts

Posted 07 October 2011 - 05:37 AM

hi j.e.k I also had the no module named mixer error. I was using python 3.2 and pygame 1.9.2. Then I tried with python 3.1 and pygame 1.9.1 as suggested . Still got the same error. I tried in different ways and googled for one day but couldn't find a solution. I even posted in some forums. The next morning I found a solution. I think it has nothing to do with python and pygame versions.

We downloaded hpfrog_sounds folder for chapter 7. When you save your python file in hpfrog_sounds folder and run from there, you will get the no module named mixer error.

Put you python file and only necessary wave files(buzz,carhorn,ohno,heartbeat) in new a folder. Run. You will find it working now. :D

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users