Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
“希罗库”;推送被拒绝,未能编译Python应用程序;_Python_Heroku_Github_Flask_Push - Fatal编程技术网

“希罗库”;推送被拒绝,未能编译Python应用程序;

“希罗库”;推送被拒绝,未能编译Python应用程序;,python,heroku,github,flask,push,Python,Heroku,Github,Flask,Push,我正在尝试将我的Flask web应用程序推送到Heroku,但在尝试推送到Heroku时出现以下错误: Fetching repository, done. Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 339 bytes | 0 bytes/s, done. Total

我正在尝试将我的Flask web应用程序推送到Heroku,但在尝试推送到Heroku时出现以下错误:

Fetching repository, done.
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 339 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)

-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.6.
-----> Using Python runtime (python-2.7.6)
-----> Installing dependencies using Pip (1.5.4)
   Downloading/unpacking distribute==0.6.24 (from -r requirements.txt (line 4))
     Running setup.py (path:/tmp/pip_build_u5791/distribute/setup.py) egg_info for package distribute

       warning: no files found matching 'Makefile' under directory 'docs'
       warning: no files found matching 'indexsidebar.html' under directory 'docs'
   Installing collected packages: distribute
     Running setup.py install for distribute
       Before install bootstrap.
       Scanning installed packages
       Setuptools installation detected at /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg
       Egg installation
       Patching...
       Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1394497694.33
       Patched done.
       Relaunching...
       Traceback (most recent call last):
         File "<string>", line 1, in <module>
       NameError: name 'install' is not defined
       Complete output from command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u5791/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gbF0K5-record/install-record.txt --single-version-externally-managed --compile:
       Before install bootstrap.

   Scanning installed packages

   Setuptools installation detected at /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg

   Egg installation

   Patching...

   Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1394497694.33

   Patched done.

   Relaunching...

   Traceback (most recent call last):

     File "<string>", line 1, in <module>

   NameError: name 'install' is not defined

   ----------------------------------------
   Cleaning up...
   Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u5791/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gbF0K5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u5791/distribute
   Storing debug log for failure in /app/.pip/pip.log

!     Push rejected, failed to compile Python app

To git@heroku.com:censusmappingandmarketing.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:censusmappingandmarketing.git'
我的Heroku日志是:

2014-03-11T00:43:07.000598+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/ host=censusmappingandmarketing.herokuapp.com request_id=b86bab40-2441-41ee-bf25-e975dcb90c2d fwd="208.91.53.193" dyno= connect= service= status=503 bytes=

我忘了为Heroku添加Procfile。它必须是:

web: gunicorn app:app
web: gunicorn app:app