Skip to content Skip to sidebar Skip to footer

Cannot Install Pyaudio 0.2.11 In Ubuntu 16.04

I downloaded PyAudio 0.2.11 tar file from https://pypi.python.org/pypi/PyAudio and run the following command: sudo python setup.py install and I get the following error: running

Solution 1:

Python The first software requirement is Python 2.6, 2.7, or Python 3.3+. This is required to use the library.

PyAudio (for microphone users) PyAudio is required if and only if you want to use microphone input (Microphone). PyAudio version 0.2.11+ is required, as earlier versions have known memory management bugs when recording from microphones in certain situations.

If not installed, everything in the library will still work, except attempting to instantiate a Microphone object will raise an AttributeError.

The installation instructions on the PyAudio website are quite good - for convenience, they are summarized below:

On Windows, install PyAudio using Pip: execute pip install pyaudio in a terminal.

On Debian-derived Linux distributions (like Ubuntu and Mint), install PyAudio using APT: execute sudo apt-get install python-pyaudio python3-pyaudio in a terminal. If the version in the repositories is too old, install the latest release using Pip: execute sudo apt-get install portaudio19-dev python-all-dev python3-all-dev && sudo pip install pyaudio (replace pip with pip3 if using Python 3).

On OS X, install PortAudio using Homebrew: brew install portaudio. Then, install PyAudio using Pip: pip install pyaudio.

On other POSIX-based systems, install the portaudio19-dev and python-all-dev (or python3-all-dev if using Python 3) packages (or their closest equivalents) using a package manager of your choice, and then install PyAudio using Pip: pip install pyaudio (replace pip with pip3 if using Python 3).

PyAudio wheel packages for common 64-bit Python versions on Windows and Linux are included for convenience, under the third-party/ directory in the repository root. To install, simply run pip install wheel followed by pip install ./third-party/WHEEL_FILENAME (replace pip with pip3 if using Python 3) in the repository root directory.

Solution 2:

Tried everything..The only way work for me was download the file from https://pypi.org/project/PyAudio/#files and install it

Solution 3:

sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo apt-get install python-pyaudio

from your terminal

Solution 4:

This works for me:

sudo pip install --upgrade pyaudio

Solution 5:

you download PyAudio-0.2.11.tar.gz (md5) in https://pypi.python.org/pypi/PyAudio#downloads and extract file.

  • cd PyAudio-0.2.11

  • sudo python setup.py install

you look:

running install 
running bdist_egg
running egg_info
writing src/PyAudio.egg-info/PKG-INFO
writing top-level names to src/PyAudio.egg-info/top_level.txt
writing dependency_links to src/PyAudio.egg-info/dependency_links.txt
reading manifest file 'src/PyAudio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/PyAudio.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/_portaudiomodule.o -lportaudio -o build/lib.linux-x86_64-2.7/_portaudio.so
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_portaudio.so -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/pyaudio.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/pyaudio.py to pyaudio.pyc
creating stub loader for _portaudio.so
byte-compiling build/bdist.linux-x86_64/egg/_portaudio.py to _portaudio.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying src/PyAudio.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/PyAudio.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/PyAudio.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/PyAudio.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/PyAudio-0.2.11-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing PyAudio-0.2.11-py2.7-linux-x86_64.egg
Copying PyAudio-0.2.11-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
Adding PyAudio 0.2.11 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/PyAudio-0.2.11-py2.7-linux-x86_64.egg
Processing dependencies for PyAudio==0.2.11
Finished processing dependencies for PyAudio==0.2.11

Post a Comment for "Cannot Install Pyaudio 0.2.11 In Ubuntu 16.04"