Cannot install pyaudio, gcc error

前端 未结 9 1679
孤街浪徒
孤街浪徒 2020-12-05 05:08

Trying to install pyaudio with instructions per here:

$ git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
$ cd pyaudio
$ sudo python setup.py inst         


        
相关标签:
9条回答
  • 2020-12-05 05:42

    try this command pip install PyAudio

    0 讨论(0)
  • 2020-12-05 05:49

    Sorry about the inappropriate answer last time, I will post the solution of the question. It might be helpful for Ubuntu distributions.

    1. First we need to install portaudio modules: sudo apt-get install libasound-dev

    2. Download the portaudio archive from: http://portaudio.com/download.html

    3. Unzip the archive: tar -zxvf [portaudio.tgz]

    4. Enter the directory, then run: ./configure && make

    5. Install: sudo make install

    6. And finally: sudo pip install pyaudio

    7. Check the version of pyaudio, it should be 0.2.9

    0 讨论(0)
  • 2020-12-05 05:51

    For Windows :

    Install using pip:

     python -m pip install pyaudio
    

    if pip is not already bundled with your installation of Python, get it here.

    For Mac OS X :

    Use Homebrew to install the prerequisite portaudio library, then install PyAudio using pip:

     brew install portaudio
     pip install pyaudio
    

    pip will download the PyAudio source and build it for your version of Python.

    For Debian/Ubuntu :

    Use the package manager to install PyAudio:

     sudo apt-get install python-pyaudio python3-pyaudio
    

    If the latest version of PyAudio is not available, install it using pip:

    pip install pyaudio
    

    For better isolation from system packages, consider installing PyAudio in a virtual environment

    PyAudio Source :

    Source is available for download at the Python Package Index (PyPI): here!

    Or clone the git repository:

    git clone https://people.csail.mit.edu/hubert/git/pyaudio.git
    

    credits: PyAudio and GitHub:Speech_Recognition

    0 讨论(0)
提交回复
热议问题