我尝试将使用python的Dash框架构建的应用程序部署到Heroku。按照此处发布的部署说明进行操作。
我在推送到主资料库时遇到问题。看起来与蟒蛇安装冲突。
Cmd: git push heroku master
Collecting anaconda-client==1.6.14 (from -r
/tmp/build_7c37a8969b8001471e926143aa44a460/requirements.txt (line 2))
remote: Could not find a version that satisfies the requirement
anaconda-client==1.6.14 (from -r
/tmp/build_7c37a8969b8001471e926143aa44a460/requirements.txt (line 2)) (from
versions: 1.1.1, 1.2.2)
remote: No matching distribution found for anaconda-client==1.6.14 (from
-r /tmp/build_7c37a8969b8001471e926143aa44a460/requirements.txt (line 2))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to stroom-dash.
remote:
To https://git.heroku.com/stroom-dash.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/stroom-dash.git'
您正在使用 Heroku 的文档与不支持 Conda 运行时的 Python 构建包一起部署。Heroku 推荐的方法是使用 Docker(此处的示例(将 Conda 运行时部署到 Heroku。
另一种选择是简单地使用 Conda 构建包而不是 Docker 映像。