首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Django在Heroku上的部署问题与运行的应用程序的精确克隆:推送拒绝错误

Django在Heroku上的部署问题与运行的应用程序的精确克隆:推送拒绝错误
EN

Stack Overflow用户
提问于 2014-03-14 07:38:55
回答 1查看 574关注 0票数 4

我在Heroku上有一个Django应用程序。我在同一个Heroku帐户上安装了另一个应用程序。

现在我想要第一个应用程序的另一个实例。

我刚刚克隆了第一个应用程序,并将其插入到新创建的应用程序中,但它不起作用。

在执行git push heroku master时得到此错误

代码语言:javascript
运行
复制
        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.1394782343.31
           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_u57096/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-TYqPAN-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.1394782343.31

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

 !     Push rejected, failed to compile Python app

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

我的requirements.txt文件是

代码语言:javascript
运行
复制
Django==1.4
South==0.7.5
boto==2.5.2
distribute==0.6.27
dj-database-url==0.2.1
django-debug-toolbar==0.9.4
django-flash==1.8
django-mailgun==0.2.1
django-registration==0.8
django-session-security==2.0.3
django-sslify==0.2
django-storages==1.1.5
gunicorn==0.14.6
ipdb==0.7
ipython==0.13
newrelic==1.6.0.13
psycopg2==2.4.5
raven==2.0.3
requests==0.13.6
simplejson==2.4.0
wsgiref==0.1.2
xlrd==0.7.9
xlwt==0.7.4

请帮我把这个处理掉

EN

回答 1

Stack Overflow用户

发布于 2015-03-20 10:45:26

virtualenv是一个创建独立Python环境的工具。

您需要添加以下内容来修复command python setup.py egg_info failed with error code 1,因此在您的requirements.txt中添加以下内容:

virtualenv==12.0.7

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22398881

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档