Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pip install pyaudio" Error #1

Open
HuangJiaLian opened this issue May 25, 2022 · 1 comment
Open

"pip install pyaudio" Error #1

HuangJiaLian opened this issue May 25, 2022 · 1 comment

Comments

@HuangJiaLian
Copy link
Owner

Collecting pyaudio
  Downloading PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jack/.jackprograms/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-m__a7xk0
       cwd: /tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  copying src/pyaudio.py -> build/lib.linux-x86_64-3.9
  running build_ext
  building '_portaudio' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/src
  gcc -pthread -B /home/jack/.jackprograms/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/jack/.jackprograms/anaconda3/include -I/home/jack/.jackprograms/anaconda3/include -fPIC -O2 -isystem /home/jack/.jackprograms/anaconda3/include -fPIC -I/home/jack/.jackprograms/anaconda3/include/python3.9 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.9/src/_portaudiomodule.o
  src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
     29 | #include "portaudio.h"
        |          ^~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyaudio
  Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: /home/jack/.jackprograms/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/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 /tmp/pip-record-hihh8fk9/install-record.txt --single-version-externally-managed --compile --install-headers /home/jack/.jackprograms/anaconda3/include/python3.9/pyaudio
         cwd: /tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    copying src/pyaudio.py -> build/lib.linux-x86_64-3.9
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/src
    gcc -pthread -B /home/jack/.jackprograms/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/jack/.jackprograms/anaconda3/include -I/home/jack/.jackprograms/anaconda3/include -fPIC -O2 -isystem /home/jack/.jackprograms/anaconda3/include -fPIC -I/home/jack/.jackprograms/anaconda3/include/python3.9 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.9/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
       29 | #include "portaudio.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/jack/.jackprograms/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aqhwvtox/pyaudio_9cd3a83c289a444a975732f84e82906c/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 /tmp/pip-record-hihh8fk9/install-record.txt --single-version-externally-managed --compile --install-headers /home/jack/.jackprograms/anaconda3/include/python3.9/pyaudio Check the logs for full command output.
@HuangJiaLian
Copy link
Owner Author

The main reason is this line: portaudio.h: No such file or directory

Solution:

sudo apt-get install portaudio19-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant