Posted 16 March 2013 - 04:01 PM
Help - I give up - when I try to run the following code I get this message - thanks in advance for any information you can provide.
Traceback (most recent call last):
File "C:/Head First Programming/pySounds.py", line 1, in <module>
ImportError: No module named 'pygame'
I made sure the python program is in the same directory as the pygame folder - I checked and the file mixer.h is in the pygame folder so I am not sure why it is not found. Is there something that I must do since this is a .h file?
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
Here is the code from page 221 in the Head First Programming book:
# from pygame import mixer
sounds = pygame.mixer
s = sounds.Sound("heartbeat.wav")
s2 = sounds.Sound("buzz.wav")
s3 = sounds.Sound("ohno.wav")
s4 = sounds.Sound("carhorn.wav")