0

我正在尝试遵循此应用程序的安装指南:https ://github.com/plivo/voicechat

我按照信中的指南将它克隆到我的 git 存储库中,创建了一个新的 heroku 应用程序等。然而,当我部署时,Heroku 拒绝了它。

我对 heroku 拒绝进行了一些搜索,看起来这通常是因为缺少 requirements.txt 或 procfile,但我两者都有。

'''

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

'''

4

1 回答 1

2

似乎 requirements.txt 中的一个部门(分发)有问题。尝试删除版本(以获得最新版本)。改变:

distribute==0.6.27

经过:

distribute
于 2014-03-14T19:27:46.770 回答