setuptools - How to solve pkg_resources.VersionConflict error during bin/python bootstrap.py -d -


i tring create new plone environment using python plone-devstart.py tool. got bootstrap error. used command bin/python bootstrap.py -d project directory. it(bin/python bootstrap.py -d command) worked fine before got error like

oomsys@oomsysmob-6:~/demobrun$ bin/python bootstrap.py -d downloading http://pypi.python.org/packages/source/d/distribute/distribute-   0.6.49.tar.gz extracting in /tmp/tmpdqvwya working in /tmp/tmpdqvwya/distribute-0.6.49 building distribute egg in /tmp/tmpv4bzyv /tmp/tmpv4bzyv/distribute-0.6.49-py2.7.egg traceback (most recent call last): file "bootstrap.py", line 118, in <module> ws.require('zc.buildout' + version) file "build/bdist.linux-i686/egg/pkg_resources.py", line 698, in require file "build/bdist.linux-i686/egg/pkg_resources.py", line 600, in resolve pkg_resources.versionconflict: (setuptools 0.6c11 (/home/oomsys/demobrun   /lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg),     requirement.parse('setuptools>=0.7')) 

you have distribute fork of setuptools installed in site packages, bootstrap.py trying install buildout 2.2.0, uses new merged setuptools 0.7 or newer egg.

the distribute fork of setuptools merged setuptools project , transition causing pain.

your options are:

tell bootstrap use earlier zc.buildout version

run bootstrap.py -v option, forcing stick specific, earlier version:

 $ bin/python bootstrap.py -d -v 2.1.1 

version 2.1.1 of buildout not upgrade 2.2 or newer , works distribute-supplied setuptools egg.

uninstall old distribute egg

manually delete distribute*, pkg_resources.py* , setuptools* files site-packages directory:

$ rm -rf /home/oomsys/demobrun/lib/python2.7/site-packages/setuptools* $ rm -rf /home/oomsys/demobrun/lib/python2.7/site-packages/distribute* $ rm -rf /home/oomsys/demobrun/lib/python2.7/site-packages/pkg_resources.py* 

and (optionally) reinstall setuptools latest ez_setup.py; current version 0.9.6, , setuptools pypi page links this ez_setup.py version.

you'll need upgrade bootstrap.py script, see below.

use recent virtualenv

version 1.9 or newer of virtualenv (released march 2013) lets create virtualenv without setuptools egg using --no-setuptools switch:

$ virtualenv --no-setuptools buildout_env 

use create virtual env python run bootstrap.py. still need upgrade bootstrap.py too. see below.

upgrade bootstrap.py.

for zc.buildout versions 2.2.0 , bootstrap.py script has been updated load setuptools the-not-forked-version. grab new copy @ from github (link 2 branch version), replace old bootstrap.py it, , bootstrap again.

do make sure removed old forked really-distribute-but-pretending-to-be-setuptools egg first or run virtual env python not have egg. see above.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -