Django项目无法部署到Heroku

时间:2017-07-05 17:32:32

标签: python django heroku

我正在尝试部署Django项目。 首先,我收到了这个错误:

Counting objects: 74, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (65/65), done.
Writing objects: 100% (74/74), 25.74 KiB | 0 bytes/s, done.
Total 74 (delta 24), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect app matching https://codon-
buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz buildpack
remote:        More info: 
https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to nicoplus.
remote:
To https://git.heroku.com/nicoplus.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/nicoplus.git'

然后,我设置了buildpack:     

heroku buildpacks:set heroku/python
但是,它仍然会抛出一个错误:     
remote: -----> Failed to detect app matching https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz buildpack
那么,这个问题的解决方案是什么?

PS:python是2.7.12

1 个答案:

答案 0 :(得分:0)

透过Heroku docs,我发现了这个:

“有许多额外的,不受支持的运行时可用。但是,我们只赞同并支持使用Python 3.6.1和2.7.13。”

我的猜测是使用2.7.12将其抛弃。

相关问题