Lame- mp3 encoding

Probleme bei der Installation?
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

Hey,
ich würde gerne mit pyaudio mp3 erstellen, dafür brauch ich aber LAME. Ich kann es mit subprocess nutzen, jedoch würde ich es gerne als libary zur verfügung haben. Habe auch py-lame 0.1 aber keine ahnung wie man das installiert. Help!



gruß
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

``python setup.py install`` bzw. das entsprechende Paket aus deinem Paketmanagement hernehmen. Ich würde aber vermutlich auf ``gstreamer0.10-lame`` zurückgreifen, in der Hoffnung dass ich das aus Python brauchbar ansprechen kann.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

hmm, finde das nur als debian file, und kann leider bei meinem lame keine setup.py finden. Könntest du mir den link zu deinem geben?
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

waki hat geschrieben:Könntest du mir den link zu deinem geben?
Klar, hier. Ist im Tarball, vermute mal dass die ZIP-Datei den gleichen Inhalt hat.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

da ist nur eine gen_docs.py drin, keine setup.py. Oder mach ich was falsch? :S Ist nur eine setup.in drin ...
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Oh, sorry, hab nicht genau genug geschaut. Aber in der README steht wie man es hinbekommt:

Code: Alles auswählen

make -f Makefile.pre.in boot
make
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

sorry, aber wenn ich das in meine konsole eingebe, kommt, dasser den befehl "make" nicht kennt. Brauch ich da noch ein prog dafür?
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Offensichtlich brauchst du ``make``, ja.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

ok, hab jetzt GNU make, aber das unterstütz keine 64-bit systeme :(
help?
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

waki hat geschrieben:ok, hab jetzt GNU make, aber das unterstütz keine 64-bit systeme :(
Doch, ich hab hier auch GNU make auf amd64.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

ich hab mir GNU make 3.81 runtergeladen und wenn ich dann die makefile.dos ausfürhen will, kommt:

Code: Alles auswählen

Die Version von C:\Users\user\Programme\make-3.81\makefile.com ist nicht mit de
r ausgeführten Windows-Version kompatibel. Öffnen Sie die Systeminformationen de
s Computers, um zu überprüfen, ob eine x86-(32 Bit)- oder eine x64-(64 Bit)-Vers
ion des Programms erforderlich ist, und wenden Sie sich anschließend an den Hera
usgeber der Software.
BlackJack

@waki: Schön das jetzt auch mal das verwendete Betriebssystem zur Sprache kommt. :-)

Du musst halt ein Make installieren das zu Deinem Betriebssystem passt.

Als nächstes ist dann wahrscheinlich die Installation eines C-Compilers fällig…
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

sry, hmm, hab jetzt msys, aber der meldet mir einen boot error...

Code: Alles auswählen

$ make -f Makefile.pre.in boot
rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
        VERSION=$VERSION \
        installdir=$installdir \
        exec_installdir=$exec_installdir \
        Makefile
/bin/sh: python: command not found
/bin/sh: python: command not found
/bin/sh: python: command not found
make[1]: Entering directory `/c/users/Kille/Programme/py-lame-0.1'
make[1]: *** No rule to make target `/lib/python/config/Makefile', needed by `sedscript'.  Stop.
make[1]: Leaving directory `/c/users/Kille/Programme/py-lame-0.1'
make: *** [boot] Error 2
€: Wie schwer es sein kann, eine dumme libary zum laufen zu bingen -.-
Ich hätte auch pymake inzwischen, aber weis auch nciht wie das geht ....
help, please
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

waki hat geschrieben:sry, hmm, hab jetzt msys, aber der meldet mir einen boot error...
Er meldet dass er den Befehl ``python`` nicht finden kann. Du musst ``%PATH%`` setzen (siehe FAQ, Wie starte ich Skripte).
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
derdon
User
Beiträge: 1316
Registriert: Freitag 24. Oktober 2008, 14:32

waki hat geschrieben:€: Wie schwer es sein kann, eine dumme libary zum laufen zu bingen -.-
Mit Linux wär das nicht passiert! :twisted:
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

Code: Alles auswählen

$ make -f Makefile.pre.in boot
rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
        VERSION=$VERSION \
        installdir=$installdir \
        exec_installdir=$exec_installdir \
        Makefile
make[1]: Entering directory `/c/Users/Kille/Programme/py-lame-0.1'
make[1]: *** No rule to make target `Files'.  Stop.
make[1]: Leaving directory `/c/Users/Kille/Programme/py-lame-0.1'
make: *** [boot] Error 2
Variable erstellt, geht trotzdem nicht :(
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Ok, dieses Makefile-Gewurstel ist echt nicht hübsch, nimm mal diese ``setup.py``:

Code: Alles auswählen

from distutils.core import setup, Extension

module1 = Extension('lame',
                    sources = ['lamemodule.c'])

setup (name = 'lame',
       version = '0.1',
       description = 'lame interface',
       ext_modules = [module1])
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

ausgeführt, installation erfolgriech aber hab keine lame modul zum importieren -.-

Code: Alles auswählen

C:\Users\Kille\Programme\py-lame-0.1>setup.py install
running install
running build
running build_ext
building 'lame' extension
error: None

C:\Users\Kille\Programme\py-lame-0.1>python
Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lame
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lame
>>> import pylame
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pylame
>>>
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Schau mal ob bei dir in ``site-packages`` irgendeine ``.pyd``-Datei liegt, die vom Namen her passt.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
waki
User
Beiträge: 133
Registriert: Dienstag 9. März 2010, 16:41

im ganzen python ordner ist nichts mit lame....
Antworten