我有想要应用到Heroku的Flask应用程序。
我已经这样制作了一个Procfile:
web: gunicorn routes:app
和requests.txt:
click==6.7
Flask==0.12
gunicorn==19.6.0
itsdangerous==0.24
Jinja2==2.8.1
MarkupSafe==1.0
Werkzeug==0.14.1
但是每当我尝试运行命令时:
git push heroku master
我总是遇到此错误:`应用与buildpack不兼容:https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
即使我已将buildpack设置为python。我的主要python文件名为routes.py
,因此Profile应该正确,并且我进行了大量研究,所有依赖项都在那里,这可能是什么问题?
对于我所有的依存关系,我还拥有一个Pipfile和一个Pipfile.lock。
我尝试使用pip install --upgrade -r requirements.txt
并导致此错误:
No matching distribution found for adium-theme-ubuntu==0.3.4 (from -r /tmp/build_622384b275f7a5f640333152a3b25ba1/requirements.txt (line 1))
Git状态的输出:
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
我从我的requirements.txt中获得的错误
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/__init__.py", line 5, in <module>
import distutils.core
File "/app/.heroku/python/lib/python3.6/distutils/core.py", line 16, in <module>
from distutils.dist import Distribution
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 9, in <module>
import re
File "/app/.heroku/python/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-oqscorl3/enum34/
Push rejected, failed to compile Python app.