hey everybody i just upgraded from 2.5 to 2.6 and im having problems with building pymedia since there is no binaries out there -.-
this is what im doing and getting

C:\pymedia>python setup.py build
Using WINDOWS configuration...

Path for OGG: ..\pymedia\libogg-1.1.4
Path for VORBIS: ..\pymedia\libvorbis-1.2.3
Path for FAAD: ..\pymedia\libfaad2
Path for MP3LAME: ..\pymedia\lame-3.95.1
Path for VORBISENC: ..\pymedia\libvorbis-1.2.3
Path for ALSA: ..\pymedia\libasound
Continue building pymedia ? [Y,n]:y
running build
running build_py
creating build
creating build\lib.win32-2.6
creating build\lib.win32-2.6\pymedia
copying inst_lib\meta.py -> build\lib.win32-2.6\pymedia
copying inst_lib\player.py -> build\lib.win32-2.6\pymedia
copying inst_lib\__init__.py -> build\lib.win32-2.6\pymedia
creating build\lib.win32-2.6\pymedia\audio
copying inst_lib\audio\__init__.py -> build\lib.win32-2.6\py
creating build\lib.win32-2.6\pymedia\video
copying inst_lib\video\__init__.py -> build\lib.win32-2.6\py
creating build\lib.win32-2.6\pymedia\video\ext_codecs
copying inst_lib\video\ext_codecs\__init__.py -> build\lib.w
eo\ext_codecs
creating build\lib.win32-2.6\pymedia\removable
copying inst_lib\removable\__init__.py -> build\lib.win32-2.
running build_ext
building 'pymedia.audio.sound' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\sound
gcc -mno-cygwin -mdll -O -Wall -DBUILD_NUM=1863 -DWIN32 -DCO
_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCON
ONFIG_H -DUDF_CACHE=1 -I../pymedia/libogg-1.1.4/include -I..
.2.3/include -I../pymedia/libfaad2/include -I../pymedia/lame
/pymedia/libvorbis-1.2.3/include -I../pymedia/libasound -IC:
C:\python26\include -IC:\python26\PC -c sound\sound.cpp -o b
Release\sound\sound.o
error: command 'gcc' failed: No such file or directory

what am i doing wrong ? ive been trying to fix this for hours and eve trying to find a binarie to just install and skip this headache
The thing i whant is just a wworking pymedia on my python 2.6 =) someone please ?? help me somehow

Recommended Answers

As far as I know the Python25.DLL and the Python26.DLL use 2 different MS C compilers (2003 vs 2008 ?) for the Windows product. The two C versions are not compatible.

I got the Python24 binary version to work on Python25 as explained here ...

# …
Jump to Post

Added some more info to my previous post.

Depends on how deep you go into sound and media, but I started using PyGame, at least that one is still active.

Jump to Post

All 7 Replies

As far as I know the Python25.DLL and the Python26.DLL use 2 different MS C compilers (2003 vs 2008 ?) for the Windows product. The two C versions are not compatible.

I got the Python24 binary version to work on Python25 as explained here ...

# PyMedia wave play
# download: pymedia-1.3.5.0-pre2.win32-py2.4.exe
# free from: http://pymedia.org/
# pymedia will work with python25 if you hexedit all 5 .pyd files
# in the pymedia installed folder and its subfolders
# --> find ref to python24.dll and change to python25.dll

import sys

def playWAV( fname ):
    import pymedia.audio.sound as sound
    import time, wave
    f = wave.open( fname, 'rb' )
    sampleRate = f.getframerate()
    channels = f.getnchannels()
    format = sound.AFMT_S16_LE
    print sampleRate, channels, format  # test => 8000 1 16
    snd1 = sound.Output( sampleRate, channels, format )
    #s = f.readframes( 300000 )
    #snd1.play( s )

    s = ' '
    while len(s):
        s = f.readframes( 1000 )
        snd1.play( s )

  
    # since sound module is not synchronous we want everything to be played before we exit
    while snd1.isPlaying(): time.sleep( 0.05 )


if __name__== '__main__':
    """
    if len( sys.argv )!= 2:
        print "Usage: play_wav <file>"
    else:
        playWAV( sys.argv[ 1 ] )
    """
    waveFile = 'boing.wav'
    playWAV(waveFile)

May not work for Python26 because of the switch in MS C compiler versions.

As far as I know the Python25.DLL and the Python26.DLL use 2 different MS C compilers (2003 vs 2008 ?) for the Windows product. The two C versions are not compatible.

so im not able to do this ?

Added some more info to my previous post.

Depends on how deep you go into sound and media, but I started using PyGame, at least that one is still active.

Added some more info to my previous post.

Depends on how deep you go into sound and media, but I started using PyGame, at least that one is still active.

well ok i can go back to pygame then , thanks
but first i whant to try the thing above !!


EDIT:
Dude thanks i tried that and it worked =)
i really appreciate your help
thanks again, and no im not using all the features only the wav playing
thanks!!!

Why not use 2.5. There is binary version of it.
Just search this forum. I posted it somewhere here :)

well ok i can go back to pygame then , thanks
but first i whant to try the thing above !!


EDIT:
Dude thanks i tried that and it worked =)
i really appreciate your help
thanks again, and no im not using all the features only the wav playing
thanks!!!

Now I am curious, did that work for Python26?

Now I am curious, did that work for Python26?

yes it did, im using python 2.6 and is able to play wav files as before =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.