Question

I'm trying to follow the installation guide for this app: https://github.com/plivo/voicechat

I cloned it into my git repository, created a new heroku app, etc, following the guide to the letter. When I deploy, however, Heroku rejects it.

I did some searching about heroku rejections, and it looks like it's usually because of a missing requirements.txt or procfile, but I have both.

'''

$ git push heroku master -f
Initializing repository, done.
Counting objects: 103, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (94/94), done.
Writing objects: 100% (103/103), 1.51 MiB | 837.00 KiB/s, done.
Total 103 (delta 8), reused 103 (delta 8)

-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.6.
-----> Preparing Python runtime (python-2.7.6)
-----> Installing Setuptools (2.1)
-----> Installing Pip (1.5.4)
-----> Installing dependencies using Pip (1.5.4)
       Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
         Running setup.py (path:/tmp/pip_build_u32684/Flask/setup.py) egg_info for 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.2 (from -r requirements.txt (line 2))
         Running setup.py (path:/tmp/pip_build_u32684/Jinja2/setup.py) egg_info for package Jinja2

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

       Downloading/unpacking Werkzeug==0.9.4 (from -r requirements.txt (line 4))
         Running setup.py (path:/tmp/pip_build_u32684/Werkzeug/setup.py) egg_info 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 distribute==0.6.27 (from -r requirements.txt (line 5))
         Running setup.py (path:/tmp/pip_build_u32684/distribute/setup.py) egg_info for package distribute

       Downloading/unpacking gunicorn==18.0 (from -r requirements.txt (line 6))
         Running setup.py (path:/tmp/pip_build_u32684/gunicorn/setup.py) egg_info for package gunicorn

       Downloading/unpacking itsdangerous==0.23 (from -r requirements.txt (line 7))
         Running setup.py (path:/tmp/pip_build_u32684/itsdangerous/setup.py) egg_info for package itsdangerous

       Downloading/unpacking plivo==0.9.4 (from -r requirements.txt (line 8))
         Downloading plivo-0.9.4.tar.gz
         Running setup.py (path:/tmp/pip_build_u32684/plivo/setup.py) egg_info for package plivo

       Downloading/unpacking redis==2.9.0 (from -r requirements.txt (line 9))
         Running setup.py (path:/tmp/pip_build_u32684/redis/setup.py) egg_info for package redis

       Downloading/unpacking requests==2.2.0 (from -r requirements.txt (line 10))
       Downloading/unpacking yolk==0.4.3 (from -r requirements.txt (line 12))
         Running setup.py (path:/tmp/pip_build_u32684/yolk/setup.py) egg_info for package yolk

           warning: no files found matching '*.txt' under directory 'tests'
           warning: no files found matching '*.conf' under directory 'docs'
           warning: no files found matching '*.css_t' under directory 'docs'
           warning: no files found matching 'indexsidebar.html' under directory 'docs'
           warning: no files found matching 'tests/test_cli.py'
       Installing collected packages: Flask, Jinja2, MarkupSafe, Werkzeug, distribute, gunicorn, itsdangerous, plivo, redis, requests, yolk
         Running setup.py install for 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'
         Running setup.py install for Jinja2

           warning: no files found matching '*' under directory 'custom_fixers'
         Running setup.py install for MarkupSafe

           building 'markupsafe._speedups' extension
           gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o
           gcc -pthread -shared build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so
         Running setup.py install for 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'
         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.1394818676.89
           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_u32684/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lBayXq-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.1394818676.89

       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_u32684/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lBayXq-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u32684/distribute
       Storing debug log for failure in /app/.pip/pip.log

 !     Push rejected, failed to compile Python app

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

'''

Was it helpful?

Solution

It seems there is a problem in one of the deps (distribute) in requirements.txt. Try to remove the version (in order to get the most updated). Change:

distribute==0.6.27

by:

distribute
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top