简体   繁体   English

Flask Heroku App-拒绝推送

[英]Flask Heroku App - Push Rejected

I am very new to this, and my Flask app is failing to push. 我对此很陌生,我的Flask应用无法推送。 I've read solutions where the requirements.txt file is edited to get rid of distribute and setuptools, but I have neither of these in my requirements.txt: 我已经阅读了解决方案,其中编辑了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

Here is the error output: 这是错误输出:

$ 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'
$

All advice is appreciated. 所有建议表示赞赏。 Thanks! 谢谢!

It fails because it can't install pygame. 它失败,因为它无法安装pygame。 I guess you don't need it on server, you can delete pygame==1.9.1 from requirements.txt. 我猜您在服务器上不需要它,可以从requirements.txt中删除pygame == 1.9.1

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

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