1

I encountered an import problem by PyAudio. I have a winodws 10, 64 bit, and use Anaconda and Spyder IDE with python 3.7. I installed PyAudio in Ananconda, ran as administrator, with these commands :

cd
conda install -c conda-forge PyAudio

The installation ran without any problems. I then restarted both Anaconda and SPYDER. PyAudio now shows up in Anaconda's list of installed packages.

When I try to import Pyaudio in Spyder (IPython console), I encounter this error message :

[1]: import pyaudio

Could not import the PyAudio C module '_portaudio'. Traceback (most recent call last):

File "", line 1, in import pyaudio

File "C:\ProgramData\Anaconda3\lib\site-packages\pyaudio.py", line 116, in import _portaudio as pa

ImportError: DLL load failed: The specified module could not be found.

I tried to fix it by answers to similar ImportError message issued, while other users tried to import other packages like SKlearn ... , but with no success.

Aryo
  • 23
  • 6
  • I guess I got some clues to the answer at : https://stackoverflow.com/questions/51992375/python-package-installation-issues-pyaudio-portaudio Seems all the problem is because pyaudio does not support python 3.7 ! – Aryo Aug 12 '20 at 07:28

2 Answers2

1

Your problem (and mine) are the same. The issue is, unfortunately, the version of python you're running (in tandem with your OS).

Check out this link: https://people.csail.mit.edu/hubert/pyaudio/#:~:text=Note%3A%20As%20of%20this%20update,4.

Under the INSTALLATION section in the link for WINDOWS, PyAudio's latest version (0.2.11) is compatible with Python versions: 2.7, 3.4, 3.5, 3.6.

My current python is 3.8.5, so you (and I) could never use PyAudio unless they added compatibilities or we revert to an above python version.

swagless_monk
  • 441
  • 6
  • 21
0

I tried to install portaudio using

conda install portaudio

but it seems like it didn't work as it should be. However,

conda install -c anaconda portaudio

solved the problem. see the official anaconda page

Thulfiqar
  • 393
  • 7
  • 14