git push heroku master 命令在尝试部署我的 django 应用程序时失败

时间:2021-04-21 20:29:07

标签: python django git heroku deployment

我执行了 git add 命令和 commit 命令,然后当我想使用“git push heroku master”进行部署时,它失败了很多,因为我一直在重试,然后我将 Procfile 和 runtime.txt 文件添加到项目目录中因为我之前没有,但它仍然没有用。

这些是终端的日志

Counting objects: 100% (76/76), done.
Delta compression using up to 4 threads
Compressing objects: 100% (67/67), done.
Writing objects: 100% (76/76), 467.03 KiB | 9.73 MiB/s, done.
Total 76 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Installing python-3.9.4
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting absl-py==0.11.0
remote:          Downloading absl_py-0.11.0-py3-none-any.whl (127 kB)
remote:        Collecting alabaster==0.7.12
remote:          Downloading alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
remote:        Collecting altair==4.1.0
remote:          Downloading altair-4.1.0-py3-none-any.whl (727 kB)
remote:        ERROR: Could not find a version that satisfies the requirement anaconda-client==1.7.2 (from -r /tmp/build_39bafa76/requirements.txt (line 4)) (from versions: 1.1.1, 1.2.2)
remote:        ERROR: No matching distribution found for anaconda-client==1.7.2 (from -r /tmp/build_39bafa76/requirements.txt (line 4))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: d514a5e41c9d367178f0af4d9a83d3e40cb192bd
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version d514a5e41c9d367178f0af4d9a83d3e40cb192bd
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to peaceofmindpj.
remote: 
To https://git.heroku.com/peaceofmindpj.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/peaceofmindpj.git'```



and it kept on showing this , please what can i do?

0 个答案:

没有答案