Seite 1 von 1

PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 16:32
von Bio Salami
Hi,
Ich habe meinen Pc neu Aufgesetzt und habe nun Probleme PyAudio zu Installieren. Hier ist der Fehlercode:

Code: Alles auswählen

Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nirua\\AppData\\Local\\Temp\\pip-install-_boyrb0n\\pyaudio_f0524d96a5d5486f8e9c1f88deb1d3ec\\setup.py'"'"'; __file__='"'"'C:\\Users\\nirua\\AppData\\Local\\Temp\\pip-install-_boyrb0n\\pyaudio_f0524d96a5d5486f8e9c1f88deb1d3ec\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nirua\AppData\Local\Temp\pip-record-vhrum0tv\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\nirua\AppData\Roaming\Python\Python39\Include\pyaudio'
         cwd: C:\Users\nirua\AppData\Local\Temp\pip-install-_boyrb0n\pyaudio_f0524d96a5d5486f8e9c1f88deb1d3ec\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    copying src\pyaudio.py -> build\lib.win-amd64-3.9
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nirua\\AppData\\Local\\Temp\\pip-install-_boyrb0n\\pyaudio_f0524d96a5d5486f8e9c1f88deb1d3ec\\setup.py'"'"'; __file__='"'"'C:\\Users\\nirua\\AppData\\Local\\Temp\\pip-install-_boyrb0n\\pyaudio_f0524d96a5d5486f8e9c1f88deb1d3ec\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nirua\AppData\Local\Temp\pip-record-vhrum0tv\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\nirua\AppData\Roaming\Python\Python39\Include\pyaudio' Check the logs for full command output.
Es wäre nett wenn mir jemand hälfen könnte.

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 16:50
von rogerb
@Bio Salami,
das hatten wir doch erst vor Kurzem:

viewtopic.php?f=1&t=52658#p391504

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 16:55
von Bio Salami
@rogerb das habe ich schon Ausprobiert. Der findet den Befehl pipwin nicht.

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 17:00
von rogerb
Der findet den Befehl pipwin nicht.
Hast du es denn installiert?

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 17:10
von Bio Salami
@rogerb Natürlich. Aber das was du verlinkt hast hatte nichts mit PyAudio zu tun. Ich hatte nur die Datei wie ein Modul genannt

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 17:33
von rogerb
Also ich kann auf meinem Rechner pyaudio so installieren:

Code: Alles auswählen

pip install pipwin
pipwin install pyaudio
Alternativ kannst du dir pyaudio auch hier herunterladen und mit pip installieren.
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

Beides hat bei mir funktioniert.

Falls das bei dir nicht geht, müsstest du nochmal posten was du genau für einen Fehler bekommst.


Wenn trotz Allem pipwin nicht gefunden wird, kannst du in deinem Benutzer-Homeordner schauen. Da sollte es liegen.

Re: PyAudio Funktioniert nicht

Verfasst: Freitag 20. August 2021, 17:41
von Bio Salami
Hat soweit geklappt. Danke :)