Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python OSError:找不到PortAudio库_Python_Heroku_Portaudio_Streamlit_Eoserror - Fatal编程技术网

Python OSError:找不到PortAudio库

Python OSError:找不到PortAudio库,python,heroku,portaudio,streamlit,eoserror,Python,Heroku,Portaudio,Streamlit,Eoserror,我在Streamlight中编写了代码,并且一直在为我的应用程序使用“sounddevice”。我将sounddevice放在github repo的requirements.txt中,并将其导入Streamlight代码中。它在我当地的Streamlight中运行良好。但是,每次在Heroku中部署我的应用程序时,我都会遇到这个错误: OSError: PortAudio library not found Traceback: File "/app/.heroku/python/lib/

我在Streamlight中编写了代码,并且一直在为我的应用程序使用“sounddevice”。我将sounddevice放在github repo的requirements.txt中,并将其导入Streamlight代码中。它在我当地的Streamlight中运行良好。但是,每次在Heroku中部署我的应用程序时,我都会遇到这个错误:

OSError: PortAudio library not found
Traceback:
  File "/app/.heroku/python/lib/python3.6/site-packages/streamlit/ScriptRunner.py", line 314, in _run_script
    exec(code, module.__dict__)
  File "/app/helloworld.py", line 11, in <module>
    import sounddevice as sd
  File "/app/.heroku/python/lib/python3.6/site-packages/sounddevice.py", line 71, in <module>
    raise OSError('PortAudio library not found')
o错误:找不到PortAudio库
回溯:
文件“/app/.heroku/python/lib/python3.6/site packages/streamlit/ScriptRunner.py”,第314行,在脚本中
exec(代码、模块、指令)
文件“/app/helloworld.py”,第11行,在
将sounddevice作为sd导入
文件“/app/.heroku/python/lib/python3.6/site packages/sounddevice.py”,第71行,在
引发操作错误('未找到PortAudio库')

有人知道怎么做吗?谢谢大家!

PortAudio是一种声音驱动程序,需要安装在操作系统级别,以便Python库能够与之挂钩。对于任何使用portaudio的代码,都会出现此错误,因此它不是真正的Streamlight错误

作为一个引导程序,您可以像在Ubuntu Linux上一样构建软件包

一旦你能安装软件包,我希望你能完成剩下的工作