我使用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
结尾。参见安装文档