Bin/buildout with --setuptools-version=33.1.1 still calling setuptools 0.6c11

hi,
i have to move old plone 4.1.4 to server with better hardware,

i made virutal venv/ dir in buildout with Python 2.7.5 without setuptools:
virtualenv --python=/bin/python --no-setuptools venv

then i ran bellow command to have bin/buildout
venv/bin/python bootstrap-buildout.py --setuptools-version=33.1.1 --buildout-version=2.13.3 -c production.cfg

now check bin/buildout
cat bin/buildout
#!/srv/data/intranet6/venv/bin/python

import sys
sys.path[0:0] = [
  '/srv/data/intranet6/eggs/zc.buildout-2.13.3-py2.7.egg',
  '/srv/data/intranet6/eggs/setuptools-33.1.1-py2.7.egg',
  ]

but when run
bin/buildout -vD -c production.cfg

i still got error pointing to setuptools 0.6c11:

Got enum34 1.0.
While:
  Installing instance.
Traceback (most recent call last):
  File "/srv/data/intranet6/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1683, in main
    getattr(buildout, command)(args)
  File "/srv/data/intranet6/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 555, in install
    installed_files = self[part]._call(recipe.install)
  File "/srv/data/intranet6/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1227, in _call
    return f()
  File "/srv/data/intranet6/eggs/plone.recipe.zope2instance-4.1.9-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 96, in install
    self.install_scripts()
  File "/srv/data/intranet6/eggs/plone.recipe.zope2instance-4.1.9-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 533, in install_scripts
    requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
  File "/srv/data/intranet6/eggs/zc.recipe.egg-1.2.2-py2.7.egg/zc/recipe/egg/egg.py", line 90, in working_set
    **kw)
  File "/srv/data/intranet6/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/easy_install.py", line 800, in install
    return installer.install(specs, working_set)
  File "/srv/data/intranet6/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/easy_install.py", line 676, in install
    raise VersionConflict(err, ws)
VersionConflict: There is a version conflict.
We already have: setuptools 0.6c11
but cryptography 1.3 requires 'setuptools>=11.3'.

Please give a hint, many thanks for your time.

This might sound too negative but any Plone site < 4.3 is very very difficult to move to any new hardware or OS versions. The support for those Plone versions was stopped a long long time ago and as you see they depend on an ecosystem that is no longer available, installable or compatible (especially crypto & 64bit) on the latest OS versions.

Plone versions before Plone 4.3 are also not really compatible with Python 2.7 and installing Python 2.6 or lower (for example Python 2.4 was already very difficult on 64bit linux OS'es 6 or 7 years ago)

Your best shot if there is not too much custom code is to migrate the site to Plone 4.3, by copying the Data.fs/blobstorage to a new fresh buildout of 4.3 on a different machine.

[It's not impossible, but you have to stick to unsupported and now insecure OS releases. I'm still sort of responsible for one Plone 3 site which we keep on an Ubuntu 14.04 server, which was the latest Ubuntu release where we managed to install a patched Python 2.4 ]

A typical Plone 4.x buildout configuration file has a version pin for setuptools, pinning to an old version. Change this pin to the version you would like to use; do the same for the zc.buildout version pin.

You can take a look at @alert's answer in this thread: Bootstrap Plone 3 with ancient bootstrap.py The problem was solved for an even older version (Python 2.4 and Python 3).

You basically download & install the old setuptools egg directly in the virtualenv. Then you use this virtualenv to buildout.

As a side note: Bringing those old Python/Plone versions to life is pretty painful. I did not succeed, when I was trying to compile OpenSSL 1.0 /w custom source hacks to make it work with an also compiled old Python version. I would not recommend wasting your time on this.

guys thank you for psychic suport! :slight_smile:

when running bin/client1 fg, i see it can connect to db, but then i see an error:
ZopeXMLConfigurationError: File "/srv/data/intranet6/eggs/plone.directives.dexterity-1.0.2-py2.7.egg/plone/directives/dexterity/meta.zcml", line 7.4-7.52
This is out of my experiences.

Traceback (most recent call last):
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/Startup/run.py", line 72, in <module>
    run()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/Startup/run.py", line 21, in run
    starter.prepare()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/Startup/__init__.py", line 86, in prepare
    self.startZope()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/Startup/__init__.py", line 259, in startZope
    Zope2.startup()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/App/startup.py", line 118, in startup
    load_zcml()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
    load_site()
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
    _context = xmlconfig.file(site_zcml)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
    include(context, name, package)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 352, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File "/srv/data/intranet6/eggs/Zope2-2.13.12-py2.7.egg/OFS/metaconfigure.py", line 46, in loadProducts
    xmlconfig.include(_context, zcml, package=product)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 352, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File "/srv/data/intranet6/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 104, in includePluginsDirective
    includeZCMLGroup(_context, info, filename)
  File "/srv/data/intranet6/eggs/z3c.autoinclude-0.3.4-py2.7.egg/z3c/autoinclude/zcml.py", line 30, in includeZCMLGroup
    include(_context, filename, includable_package)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 352, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 352, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 705, in finish
    args = toargs(context, *self.argdata)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 1397, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/fields.py", line 137, in fromUnicode
    value = self.context.resolve(name)
  File "/srv/data/intranet6/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 198, in resolve
    return __import__(mname+'.'+oname, *_import_chickens)
  File "/srv/data/intranet6/eggs/five.grok-1.3.2-py2.7.egg/five/grok/__init__.py", line 18, in <module>
    from grokcore.site import *
  File "/srv/data/intranet6/eggs/grokcore.site-3.1-py2.7.egg/grokcore/site/__init__.py", line 17, in <module>
    from grokcore.site.directive import site  # noqa: F401
  File "/srv/data/intranet6/eggs/grokcore.site-3.1-py2.7.egg/grokcore/site/directive.py", line 19, in <module>
    from grokcore.site.components import LocalUtility
  File "/srv/data/intranet6/eggs/grokcore.site-3.1-py2.7.egg/grokcore/site/components.py", line 17, in <module>
    from grokcore.site.interfaces import IApplication
  File "/srv/data/intranet6/eggs/grokcore.site-3.1-py2.7.egg/grokcore/site/interfaces.py", line 16, in <module>
    from zope.interface.interfaces import IObjectEvent
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/srv/data/intranet6/parts/client1/etc/site.zcml", line 12.2-12.39
    ZopeXMLConfigurationError: File "/srv/data/intranet6/eggs/Products.CMFPlone-4.1.4-py2.7.egg/Products/CMFPlone/meta.zcml", line 43.4-47.10
    ZopeXMLConfigurationError: File "/srv/data/intranet6/eggs/plone.app.dexterity-1.1-py2.7.egg/plone/app/dexterity/meta.zcml", line 4.2-4.67
    ZopeXMLConfigurationError: File "/srv/data/intranet6/eggs/plone.directives.dexterity-1.0.2-py2.7.egg/plone/directives/dexterity/meta.zcml", line 7.4-7.52
    ImportError: cannot import name IObjectEvent

Please give 1-2 psychic hints :smiley:
Thank you for your times, appriciated!

I think you now entered the realm of "trying to find a good set of version pins for your Plone installation". :slight_smile:

Judging from your traceback I think the following is happening:

  • You have grokcore.site (or similar) in your eggs= list, but without a version pin.
  • It downloads the latest version. This new version inherently assumes you have a new version of zope.interface (e.g. by having IObjectEvent)
  • But since you have an old Plone 4 version, it has already pinned zope.interface to an older version - not having IObjectEvent.

So my educated guess would be to pin grokcore to an older version (appropriate to the release date around Plone 4.1.4). Rinse and repeat until all errors are gone.

Extra hint: To find the correct version pins, it helps, when you can find an old existing scripts in {buildout-dir}/bin. Those set the available modules explicitly, e.g.:

import sys
sys.path[0:0] = [
  '/path/to/your/buildout/eggs/Pillow-3.3.3-py2.7-linux-x86_64.egg',
  '/path/to/your/buildout/eggs/Plone-4.3.18-py2.7.egg',
  '/path/to/your/buildout/eggs/six-1.10.0-py2.7.egg',
...

From the paths you can easily get the versions that were once used and working back then.