Having trouble installing PyAudio for Python3 on Mint

我们两清 提交于 2019-12-05 06:27:08
jfs

You don't need to compile pyaudio. To install PyAudio, run:

$ sudo add-apt-repository universe
$ sudo apt-get install python-pyaudio python3-pyaudio

The first command enables Universe Ubuntu repository.

If you want to compile it e.g., to use the latest version from git; install build dependencies:

$ sudo apt-get build-dep python-pyaudio python3-pyaudio

After that, you could install it from sources using pip:

$ python3 -mpip install pyaudio

Or to install the current version from git:

$ pip install -e git+http://people.csail.mit.edu/hubert/git/pyaudio.git#egg=pyaudio

Run pip commands inside a virtualenv or add --user command-line option, to avoid modifying the global python3 installation (leave it to the package manager).

I've tested it on Ubuntu. Let me know if it fails on Mint.

To install the latest version of pyaudio using conda:

source activate -your environment name-

pip install pyaudio

You may run into the following error when installing from pip:

src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
 #include "portaudio.h" 
 compilation terminated.
 error: command 'gcc' failed with exit status 1

That is because you don't have the PortAudio development package installed. Install it with:

sudo apt-get install portaudio19-dev

I have found the work arround for mac.

please refer the below steps to install pyaudio on python 3.5

Follow these steps :

  • export HOMEBREW_NO_ENV_FILTERING=1
  • xcode-select --install
  • brew update
  • brew upgrade
  • brew install portaudio
  • pip install pyaudio

I was able to get it install with anaconda, using this package.

Follow install instructions for linux here, then do:

conda install -c bokeh pyaudio=0.2.7

try to install using the the below command

pip install pyaudio

after that install the required Microsoft Visual C++ 14.0 refer the below image for the same.

and restart the system and run the same command again

pip install pyaudio
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!