Flask Heroku应用程序 - 推送被拒绝

时间:2014-06-27 22:14:39

标签: python heroku web flask

我对此非常陌生,我的Flask应用程序无法推送。我已经阅读了编辑requirements.txt文件的解决方案,以摆脱分发和设置工具,但我的requirements.txt中没有这些:

Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
Werkzeug==0.9.6
gunicorn==19.0.0
itsdangerous==0.24
numpy==1.8.1
pygame==1.9.1
virtualenv==1.11.6

以下是错误输出:

$ git push heroku master
Initializing repository, done.
Counting objects: 36, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (34/34), done.
Writing objects: 100% (36/36), 4.73 KiB, done.
Total 36 (delta 16), reused 0 (delta 0)

-----> Python app detected
-----> Preparing Python runtime (python-2.7.7)
-----> Installing Setuptools (3.6)
-----> Installing Pip (1.5.6)
-----> Installing dependencies using Pip (1.5.6)
       Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
         Running setup.py (path:/tmp/pip_build_u10377/Flask/setup.py) egg_info f
or package Flask

           warning: no files found matching '*' under directory 'tests'
           no previously-included directories found matching 'docs/_build'
           no previously-included directories found matching 'docs/_themes/.git'

       Downloading/unpacking Jinja2==2.7.3 (from -r requirements.txt (line 2))
         Running setup.py (path:/tmp/pip_build_u10377/Jinja2/setup.py) egg_info
for package Jinja2

           warning: no files found matching '*' under directory 'custom_fixers'
       Downloading/unpacking MarkupSafe==0.23 (from -r requirements.txt (line 3)
)
         Downloading MarkupSafe-0.23.tar.gz
         Running setup.py (path:/tmp/pip_build_u10377/MarkupSafe/setup.py) egg_i
nfo for package MarkupSafe

       Downloading/unpacking Werkzeug==0.9.6 (from -r requirements.txt (line 4))

         Running setup.py (path:/tmp/pip_build_u10377/Werkzeug/setup.py) egg_inf
o for package Werkzeug

           warning: no files found matching '*' under directory 'werkzeug/debug/
templates'
           warning: no files found matching '*' under directory 'tests'
           no previously-included directories found matching 'docs/_build'
       Downloading/unpacking gunicorn==19.0.0 (from -r requirements.txt (line 5)
)
         Running setup.py (path:/tmp/pip_build_u10377/gunicorn/setup.py) egg_inf
o for package gunicorn

       Downloading/unpacking itsdangerous==0.24 (from -r requirements.txt (line
6))
         Running setup.py (path:/tmp/pip_build_u10377/itsdangerous/setup.py) egg
_info for package itsdangerous

       Downloading/unpacking numpy==1.8.1 (from -r requirements.txt (line 7))
         Running setup.py (path:/tmp/pip_build_u10377/numpy/setup.py) egg_info f
or package numpy
           Running from numpy source directory.

           warning: no files found matching 'tools/py3tool.py'
           warning: no files found matching '*' under directory 'doc/f2py'
       Downloading/unpacking pygame==1.9.1 (from -r requirements.txt (line 8))
         Could not find any downloads that satisfy the requirement pygame==1.9.1
 (from -r requirements.txt (line 8))
         Some insecure and unverifiable files were ignored (use --allow-unverifi
ed pygame to allow).
       Cleaning up...
       No distributions at all found for pygame==1.9.1 (from -r requirements.txt
 (line 8))
       Storing debug log for failure in /app/.pip/pip.log

 !     Push rejected, failed to compile Python app

To git@heroku.com:intj.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:intj.git'
$

感谢所有建议。谢谢!

1 个答案:

答案 0 :(得分:0)

它失败了,因为它无法安装pygame。我想你不需要它在服务器上,你可以从requirements.txt中删除 pygame == 1.9.1