5

I am using a conda enviroment on mac and I want to install pyAudio. I tried to follow the suggestion in many threads to run

brew install portaudio

r

pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio

But it still didn't work from within the conda enviroment. However, running

pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio 

worked outside of the conda enviroemtn (in the "base" enviroemtn").

What might be the reason? How can I install pyAudio inside the conda enviroment?

Cranjis
  • 1,590
  • 8
  • 31
  • 64

4 Answers4

8

Try conda install -c anaconda pyaudio

Source: https://anaconda.org/anaconda/pyaudio

Ambitions
  • 2,369
  • 3
  • 13
  • 24
1

portaudio is not a python package. The easiest solution would be use the pyaudio conda package from this place https://anaconda.org/anaconda/pyaudio

You can try the following commands to install pyaudio inside conda (after activating your conda environment).

conda config --add channels conda-forge

conda install pyaudio

Zabir Al Nazi
  • 10,298
  • 4
  • 33
  • 60
0

find your Python version by python --version mine is 3.7.3 for example

the easiest way to check either you have 64 or 32 Python just open it in the terminal:

find the appropriate .whl file from here, for example mine is

PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl, and download it.

go to the folder where it is downloaded for example cd C:\Users\foobar\Downloads install the .whl file with conda for example in my case:

conda install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl

link source here

Or try this if you already download whl

conda install -c anaconda pyaudio

link sourcehere

Welcome_back
  • 1,245
  • 12
  • 18
0

From the anaconda.org they recommend this pyaudio 0.27:

conda install -c mutirri pyaudio 

otherwise for pyaudio 0.2.11 this one:

conda install -c anaconda pyaudio
TassosK
  • 293
  • 3
  • 16