PortAudio library not found by sounddevice

▼魔方 西西 提交于 2019-12-09 16:57:54

问题


I have been working with a python program which uses sounddevice module to play audio. The program works fine in my office pc (running Ubuntu 17.10), but not in my home pc (running Linux Mint 18.3). It generates the following error:

Traceback (most recent call last):
  File "...path/to/my/code.py", line 11, in <module>
    import sounddevice as sd
  File "/home/arif/anaconda3/lib/python3.6/site-packages/sounddevice.py", line 64, in <module>
    raise OSError('PortAudio library not found')
OSError: PortAudio library not found 

How can I fix this problem?


回答1:


I could fix this by installing the portaudio library.

sudo apt-get install libportaudio2

You may also try following if this doesn't help.

sudo apt-get install libasound-dev


来源:https://stackoverflow.com/questions/49333582/portaudio-library-not-found-by-sounddevice

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