【发布时间】:2021-02-11 05:56:37
【问题描述】:
我使用 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:
根据文档,具有不受支持的依赖项且不提供许多轮子的软件包将不会安装。有解决办法吗?
【问题讨论】:
-
尝试从 requirements.txt 中删除 statsmodel
-
不要手动创建
requirements.txt。使用命令python -m pip freeze > requirements.txt。这将使用您使用的库版本自动与您一起编写文件。
标签: python heroku plotly-dash