Ошибка при установки модуля pyalsaaudio.

Валентин

Новичок
Пользователь
Ноя 13, 2020
114
1
18
OS: Linux Mint
Python 3.8.10
При установке модуля pyalsaaudio выдаёт ошибку.
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/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-67mbi19u
cwd: /tmp/pip-install-rqve6v_4/pyalsaaudio/
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-x86_64-3.8
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/usr/include/python3.8 -c alsaaudio.c -o build/temp.linux-x86_64-3.8/alsaaudio.o
alsaaudio.c:28:10: fatal error: alsa/asoundlib.h: Нет такого файла или каталога
28 | #include <alsa/asoundlib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyalsaaudio
Running setup.py clean for pyalsaaudio
Failed to build pyalsaaudio
Installing collected packages: pyalsaaudio
Running setup.py install for pyalsaaudio ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/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-lu_eogln/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pyalsaaudio
cwd: /tmp/pip-install-rqve6v_4/pyalsaaudio/
Complete output (12 lines):
running install
running build
running build_ext
building 'alsaaudio' extension
creating build
creating build/temp.linux-x86_64-3.8
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/usr/include/python3.8 -c alsaaudio.c -o build/temp.linux-x86_64-3.8/alsaaudio.o
alsaaudio.c:28:10: fatal error: alsa/asoundlib.h: Нет такого файла или каталога
28 | #include <alsa/asoundlib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rqve6v_4/pyalsaaudio/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-lu_eogln/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pyalsaaudio Check the logs for full command output.
Как можно решить проблему? Или есть альтернативная библиотека, работающая на Линуксе?
 

Валентин

Новичок
Пользователь
Ноя 13, 2020
114
1
18
Нашёл решение проблемы. Нужно установить Dev версию библиотеки libasound2-dev в систему.
 

Форум IT Специалистов