Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

508
Vistas
portaudio.h: No such file or directory

I got the following error while trying to install pyaudio using pip3 in ubuntu 16.04:

Collecting pyaudio
  Downloading PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mxgvewdb/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-v55chjee-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying src/pyaudio.py -> build/lib.linux-x86_64-3.5
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.5/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mxgvewdb/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-v55chjee-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mxgvewdb/pyaudio/
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

This should help

$ sudo apt-get install portaudio19-dev python-pyaudio python3-pyaudio

Tested on Ubuntu 18.04, Python 3.7.2, pyaudio 0.2.11

Added 8th of Jan 2021:

On Ubuntu 20.04 you have to use:

$ sudo apt install portaudio19-dev python3-pyaudio
over 4 years ago · Santiago Trujillo Denunciar

0

For Windows,
here's what I've been going through...

There're several ways to install PortAudio

  • vcpkg, https://vcpkg.info/port/portaudio

  • winget, https://winget.run/pkg/intxcc/pyaudio

  • Or, manually build from source and install manually

    1. download source, http://files.portaudio.com/download.html
    2. build with cmake, with the matching compiler(msvc/mingw) and arch(x64/x86) to your Python
    3. put "portaudio.h" into python-include directory, e.g. c:\Python38-32\include\
    4. put "portaudio.lib into python-lib directory, e.g. c:\Python38-32\libs

Arrh!
the "min()" macro in pyaudio's soucefile _portaudiomodule.c is troublesome, comment it out manually

  • pip install pyaudio --no-clean
  • find _portaudiomodule.c in the temp directory and manually comment-out the "min()" macro
    e.g. c:\Temp\pip-install-yysb8bme\pyaudio_c92585\src\_portaudiomodule.c
  • pip install from that directory
    e.g. pip install c:\Temp\pip-install-yysb8bme\pyaudio_c92585\

Or,3rd party wheels

  • this answer said:

pip install pipwin
pipwin install pyaudio

over 4 years ago · Santiago Trujillo Denunciar

0

For Centos7/RHEL:

yum install portaudio-devel alsa-lib-devel portaudio
pip install pyaudio --user
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda