Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/pyaudio
copying src/pyaudio/init.py -> build/lib.linux-x86_64-cpython-310/pyaudio
running build_ext
building 'pyaudio._portaudio' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/src
creating build/temp.linux-x86_64-cpython-310/src/pyaudio
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/usr/include -I/usr/local/python/3.10.13/include/python3.10 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-310/src/pyaudio/device_api.o
src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory
9 | #include "portaudio.h"
| ^~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
@rudraksh1601 ➜ /workspaces/mini-project (chatbot_AI) $ /home/codespace/.python/current/bin/python3 /workspaces/mini-project/chat-bot.py
Traceback (most recent call last):
File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 108, in get_pyaudio
import pyaudio
ModuleNotFoundError: No module named 'pyaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspaces/mini-project/chat-bot.py", line 12, in
microphone = sr.Microphone()
File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 80, in init
self.pyaudio_module = self.get_pyaudio()
File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 110, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
Building wheels for collected packages: pyaudio Building wheel for pyaudio (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [18 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/pyaudio copying src/pyaudio/init.py -> build/lib.linux-x86_64-cpython-310/pyaudio running build_ext building 'pyaudio._portaudio' extension creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/src creating build/temp.linux-x86_64-cpython-310/src/pyaudio gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/usr/include -I/usr/local/python/3.10.13/include/python3.10 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-310/src/pyaudio/device_api.o src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory 9 | #include "portaudio.h" | ^
~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output]note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyaudio Failed to build pyaudio ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects @rudraksh1601 ➜ /workspaces/mini-project (chatbot_AI) $ /home/codespace/.python/current/bin/python3 /workspaces/mini-project/chat-bot.py Traceback (most recent call last): File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 108, in get_pyaudio import pyaudio ModuleNotFoundError: No module named 'pyaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/workspaces/mini-project/chat-bot.py", line 12, in
microphone = sr.Microphone()
File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 80, in init
self.pyaudio_module = self.get_pyaudio()
File "/home/codespace/.python/current/lib/python3.10/site-packages/speech_recognition/init.py", line 110, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation