shredwheat at attbi.com
Sat Feb 23 19:16:04 CET 2002
> Can somebody help me here? I've installed SDL_mixer-1.2.1 from a
> .tar.gz package without complaint except one:
this shouldn't be a problem. if SDL_mixer can find the SMPEG library
when it configures, it enables MP3 playback. without the library you
just get no MP3 support. so it's definitely optional and shouldn't stop
things from working...
> [caltrop at localhost examples]$ python sound.py
> Traceback (most recent call last):
> File "sound.py", line 10, in ?
> import pygame.mixer, pygame.time
> ImportError: No module named mixer
the mixer module in pygame is also optional. that means pygame can build
and install without it. pygame comes with a "config.py" script, and if
it cannot find the SDL_mixer library, it disables the pygame.mixer
module. the first thing to check is the "Setup" file. this is a simple
text file created by the config, it stores the compile settings. open
the file and first check to see if there are compile flags for the
"MIXER" variable. once that seems reasonable, scroll down to the next
section which lists the optional modules. make sure the line for "mixer"
is not commented out. (uncomment "mixer_music" too)
if the Setup file already looks ok, then it means the mixer module
probably already compiled ok. perhaps take a look for "mixer.so" in the
if the Setup file is now looking correct. rerun the "setup.py" which
will get your installation up to date. as long as it doesn't error out,
i'm certain the mixer module will be installed. if the setup.py runs
cleanly and it still doesn't work, i'm guessing it might have something
to do with mismatched python versions?
> My sound card works and I ran test_linuxaudiodev.py successfully.
the problem here is not that the sound doesn't work, but the needed
pygame.mixer modules isn't being built, or isn't being found by python.
More information about the Python-list