Python 部署到 Heroku 的应用程序:未找到匹配的分布

Python app deployed to Heroku : No matching distribution found

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

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

安装时出错 sympy and/or 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 结尾。查看安装 documentation