python – Heroku上的Django部署问题与正在运行的应用程序的精确克隆:PUSH REJECTED ERROR

我在Heroku上有一个Django应用程序.我在同一个Heroku帐户上设置了另一个应用程序.

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

我刚刚克隆了第一个应用程序并推入了新创建的应用程序,但它无法正常工作.

执行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>",in <module>

       NameError: name 'install' is not defined

       ----------------------------------------
       Cleaning up...
       Command /app/.heroku/python/bin/python -c "import setuptools,'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文件

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

请帮我摆脱这个

解决方法

这似乎与问题 here有关.

换句话说,分发已被弃用,并且正在被setuptools取代.尝试使用setuptools> = 0.7替换line distribute == 0.6.27,根据链接中的建议.

相关文章

功能概要:(目前已实现功能)公共展示部分:1.网站首页展示...
大体上把Python中的数据类型分为如下几类: Number(数字) ...
开发之前第一步,就是构造整个的项目结构。这就好比作一幅画...
源码编译方式安装Apache首先下载Apache源码压缩包,地址为ht...
前面说完了此项目的创建及数据模型设计的过程。如果未看过,...
python中常用的写爬虫的库有urllib2、requests,对于大多数比...