尝试在 Linux Mint 上安装 pyaudio 时出错

时间:2021-06-14 13:17:54

标签: python python-3.x linux pycharm pyaudio

这是以下错误:

Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
    Running setup.py install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: /home/gameologist/PycharmProjects/virtualassistant/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xtvkc0zh/pyaudio_4534e484b2cf48c7be3c983e99506f2c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xtvkc0zh/pyaudio_4534e484b2cf48c7be3c983e99506f2c/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-vo7m84xe/install-record.txt --single-version-externally-managed --compile --install-headers /home/gameologist/PycharmProjects/virtualassistant/venv/include/site/python3.6/pyaudio
         cwd: /tmp/pip-install-xtvkc0zh/pyaudio_4534e484b2cf48c7be3c983e99506f2c/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying src/pyaudio.py -> build/lib.linux-x86_64-3.6
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/gameologist/PycharmProjects/virtualassistant/venv/include -I/usr/include/python3.6m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.6/src/_portaudiomodule.o
    src/_portaudiomodule.c:28:10: fatal error: Python.h: No such file or directory
     #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/gameologist/PycharmProjects/virtualassistant/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xtvkc0zh/pyaudio_4534e484b2cf48c7be3c983e99506f2c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xtvkc0zh/pyaudio_4534e484b2cf48c7be3c983e99506f2c/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-vo7m84xe/install-record.txt --single-version-externally-managed --compile --install-headers /home/gameologist/PycharmProjects/virtualassistant/venv/include/site/python3.6/pyaudio Check the logs for full command output.

我尝试了一切......但我仍然遇到同样的错误!!

0 个答案:

没有答案
相关问题