You’re right. I forgot about venv. But now I can’t install pyaudio on my virtual environment. On linux mint I should use apt-get install python3-pyaudio which I installed already, but on my venv pip3 shows:
deepspeech 0.7.4
numpy 1.19.0
pip 20.0.2
pkg-resources 0.0.0
setuptools 44.0.0
pip3 install pyaudio gives me an error:
Collecting pyaudio
Using cached 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/cybersolus/Cybersolus/Voice/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7srr5duy/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7srr5duy/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-38djlgox
cwd: /tmp/pip-install-7srr5duy/pyaudio/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
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/cybersolus/Cybersolus/Voice/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7srr5duy/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7srr5duy/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-record-e_l9qi15/install-record.txt --single-version-externally-managed --compile --install-headers /home/cybersolus/Cybersolus/Voice/include/site/python3.8/pyaudio
cwd: /tmp/pip-install-7srr5duy/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying src/pyaudio.py -> build/lib.linux-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/cybersolus/Cybersolus/Voice/include -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:28:10: fatal error: Python.h: Nie ma takiego pliku ani katalogu
28 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/cybersolus/Cybersolus/Voice/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7srr5duy/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7srr5duy/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-record-e_l9qi15/install-record.txt --single-version-externally-managed --compile --install-headers /home/cybersolus/Cybersolus/Voice/include/site/python3.8/pyaudio Check the logs for full command output.