[英]Django deployment issue on Heroku with exact clone of running app: PUSH REJECTED ERROR
I have a Django app on Heroku. 我在Heroku上有一个Django应用程序。 I set up another app on the same Heroku account. 我在同一个Heroku帐户上设置了另一个应用程序。
Now I want another instance of the first app. 现在我想要第一个应用程序的另一个实例。
I just cloned the first app and pushed into the newly created app, but it's not working. 我刚刚克隆了第一个应用程序并推入了新创建的应用程序,但它无法正常工作。
Got this error when doing git push heroku master
执行git push heroku master
时出现此错误
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'
my requirements.txt file is 我的requirements.txt文件是
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
please help me to get rid of this 请帮我摆脱这个
This appears to be related to an issue here . 这似乎与此处的问题有关。
In other words, distribute
has been deprecated and is being replaced with setuptools
. 换句话说, distribute
已被弃用,并且正在被setuptools
取代。 Try replacing the line distribute==0.6.27
with setuptools>=0.7
as per the recommendation in the link. 尝试使用setuptools>=0.7
替换line distribute==0.6.27
,根据链接中的建议。
virtualenv is a tool to create isolated Python environments. virtualenv是一个创建孤立的Python环境的工具。
you will need to add the following to fix command python setup.py egg_info failed with error code 1
, so inside your requirements.txt add this: 您将需要添加以下command python setup.py egg_info failed with error code 1
来修复command python setup.py egg_info failed with error code 1
,因此在您的requirements.txt中添加以下内容:
virtualenv==12.0.7 的virtualenv == 12.0.7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.