部署到Heroku的Python应用:没有找到匹配的发行版



我使用dash框架构建了一个应用程序,并试图将该应用程序部署到heroku。我的requirements.txt看起来像这样:

pandas
dash
Flask
sklearn
... 
...
...
sympy
statsmodel

安装sympy和/或statsmodel时出现错误

Collecting sympy
remote:          Downloading sympy-1.7.1-py3-none-any.whl (5.9 MB)
remote:        ERROR: Could not find a version that satisfies the requirement statsmodel (from -r /tmp/build_800c2283/requirements.txt (line 18)) (from versions: none)
remote:        ERROR: No matching distribution found for statsmodel (from -r /tmp/build_800c2283/requirements.txt (line 18))
remote:  !     Push rejected, failed to compile Python app.
remote: 

根据文档,不支持依赖项且不提供许多轮子的包将不会安装。有解决这个问题的方法吗?

https://devcenter.heroku.com/articles/python-pip

问题是包名为statsmodel

ERROR: Could not find a version that satisfies the requirement statsmodel

这个包叫做statsmodels。你忘了以s结尾。参见安装文档

最新更新