简体   繁体   English

Heroku 应用程序与 Python Buildpack 不兼容

[英]Heroku App Not Compatible with Python Buildpack

I'm trying to deploy a Django/Python application that runs locally, but will not deploy to Heroku.我正在尝试部署一个在本地运行但不会部署到 Heroku 的 Django/Python 应用程序。 When trying to deploy, I receive the error:尝试部署时,我收到错误:

App not compatible with buildpack: https://codon-
buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz

I've tried multiple solutions to this issue.我已经尝试了多种解决方案来解决这个问题。 Currently my build pack is set to the Python build pack.目前我的构建包设置为 Python 构建包。 (heroic build packs returns heroku/python). (英雄构建包返回 heroku/python)。 I have a Procfile, requirements.txt, runtime.txt, and Pipfile.lock, all of which usually resolve this issue.我有一个 Procfile、requirements.txt、runtime.txt 和 Pipfile.lock,所有这些通常都可以解决这个问题。

Procfile:档案:

web: gunicorn foodForThought.wsgi:application --log-file -

requirements.txt:要求.txt:

Django==1.11.8
pytz==2017.3

runtime.txt:运行时.txt:

python-3.6.0

Pipfile.lock: Pipfile.lock:

[requires]
python_full_version = "3.6.0"

All the aforementioned files are located in my home directory, and I'm also working in a virtual environment.所有上述文件都位于我的主目录中,我也在虚拟环境中工作。 Why is this error occurring?为什么会出现这个错误?

So here's what I've come up with.所以这就是我想出的。 I was also stuck with this problem until I found this command.在找到此命令之前,我也遇到了这个问题。

heroku buildpacks:add --index 1 heroku/python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM