我想将我的应用程序部署到heroku服务器。 当我发送请求时,我会回复此日志:
2020-05-26T13:30:56.122694 + 00:00 app [web.1]:_speech_py_impl = swig_import_helper() 2020-05-26T13:30.56.122695 + 00:00 app [web.1]:文件“ /app/.heroku/python/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech_py_impl.py” ,在swig_import_helper中的第16行 2020-05-26T13:30:56.122695 + 00:00 app [web.1]:返回importlib.import_module('_ speech_py_impl') 2020-05-26T13:30:56.122696 + 00:00 app [web.1]:文件“ /app/.heroku/python/lib/python3.6/importlib/init.py”, import_module中的第126行 2020-05-26T13:30:56.122696 + 00:00应用程序[web.1]:返回_bootstrap._gcd_import(名称[级别:],软件包,级别) 2020-05-26T13:30:56.122702 + 00:00 app [web.1]:ModuleNotFoundError:没有名为'_speech_py_impl'的模块
我在安装时遇到问题 ModuleNotFoundError:没有名为'_speech_py_impl'的模块
我的文件required.txt
Flask
requests
gunicorn
azure-cognitiveservices-speech
我在heroku上运行此命令时也遇到问题:
sudo apt-get install build-essential libssl1.0.0 libasound2
如何解决这个问题?
答案 0 :(得分:0)
你好,我也遇到了这个问题。 这是我的解决方法。
在项目中创建文件调用 Aptfile 。
将要安装的软件包的名称放在 Aptfile 中,就像 requirement.txt
build-essential
libssl1.0.0
libasound2