Ubuntu installation Pyaudio can't find python.h problem

Source: Internet
Author: User

When installing the Pyaudio module with the PIP tool, the following error is always reported:

  fatal error: portaudio.h: No such file or director

Tried a variety of methods, then re-read the official website of the document, the above is said:

for Debian/ubuntu

To install Pyaudio using the Package Manager:

sudo apt-get install python-pyaudio python3-pyaudio

If you do not have the latest version of Pyaudio, install it using PIP:

pip install pyaudio

Notes:

    • pip will download the Pyaudio source and build it for your system. Be sure to install the Portaudio Library Development Kit ( portaudio19-dev ) and the Python development package ( python-all-dev ) beforehand.
    • In order to better isolate the system package, consider in Virtualenv Install Pyaudio .

I use sudo apt-get install python-pyaudio python3-pyaudio then pip install Pyaudio solve the problem

Report:

Microsoft Windows

Use Pip installation :

python -m pip install pyaudio

Notes:

    • if the PIP has not been bundled with your Python installation, please in here get .
    • PIP will acquire and install the Pyaudio wheel (pre-packaged binary file). Currently, there are wheels compatible with the official releases of Python 2.7,3.4,3.5 and 3.6 . for these versions, 32-bit and 64-bit wheels can be used.
    • These binaries include the Portaudio v19 v190600_20161030 built using MinGW. They support only the Windows MME API, and do not include support for Directx,asio, and so on. If you need to support APIs that are not included, you need to compile Portaudio and Pyaudio.




Ubuntu installation Pyaudio can't find python.h problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.