推送失败的heroku

时间:2017-08-24 21:48:38

标签: python django git heroku

我需要一些帮助来解决这个问题。我在另一个heroku帐户中有其他网站,但我没有进入我的空帐户。我正在使用python3.5.0(但我尝试更改没有成功的python版本)和Django 1.10。我有我的git repositore,runtime.txt,procfile.txt,但我遇到了这个问题:(终端)

    Counting objects: 105, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (97/97), done.
Writing objects: 100% (105/105), 2.22 MiB | 113.00 KiB/s, done.
Total 105 (delta 34), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-3.5.0
remote:  !     Requested runtime (python-3.5.0) is not available for this stack (heroku-16).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to confiam2.
remote: 
To https://git.heroku.com/confiam2.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/

我该如何解决这个问题?我试图更新heroku版本,并更改​​python版本。没有成功。非常感谢谁能帮助我。

3 个答案:

答案 0 :(得分:4)

错误代码是 -

Requested runtime (python-3.5.0) is not available for this stack (heroku-16).

如果您访问建议的support page,您会发现Python 3.6.2和2.7.13是唯一支持的运行时。你为什么期望3.5.0工作?更改您的runtime.txt文件以包含 python-3.6.2 (或尝试其他版本,例如 python-3.5.2 ,也许它会起作用。谁知道,它不受支持)应用程序应该被Heroku接受(只要没有其他不相关的问题)。

答案 1 :(得分:1)

pipenv lock
git add. 
git commit -am "make it better"
git push heroku master

如果需要其他版本,请编辑新文件,然后输入所需的版本。 像这样:

[requires]
python_version = "2.7"

[requires]
python_full_version = "2.7.15"

答案 2 :(得分:1)

发现我要删除此错误的最佳答案是:- 通过pip卸载pkg-resources == 0.0.0 commpand 并运行 点冻结> requirements.txt命令 接着 git添加 git commit -m“从requirements.txt中删除了pkg” git push heroku master

与heroku一起享受这一天。...

相关问题