Error: Bad constraint 2.2.5 zc.buildout>=2.9.4

Hi !
I tried to add some add-ons to my buildout.cfg and then ran bin/buildout, I got this error
(myenv) imacfixs-MacBook-Air:zinstance imacfix$ sudo -u plone_buildout bin/buildout Password: The constraint, 2.2.5, is not consistent with the requirement, 'zc.buildout>=2.9.4'. While: Installing. Getting section lxml. Initializing section lxml. Installing recipe z3c.recipe.staticlxml. Error: Bad constraint 2.2.5 zc.buildout>=2.9.4

Any help please ?

I've changed the zc.buildout ans step tools versions then I got another error when running buildout 44

Please help me fix this

Reading the last error in your image:

Error: Referenced option does not exist: buildout var-dir

Is saying that you didn't create a var-dir option in your [buildout] section.

Try to add:

[buildout]
var-dir = ${buildout:directory}/var

I got many warnings and in the end


Is this OK ? I have Plone 4.3 for info
Thank you for your responses !

This is exactly what I get
(myenv) imacfixs-MacBook-Air:zinstance imacfix$ sudo -u plone_buildout bin/buildout
Password:
lxml: Static build requested.
Uninstalling instance.
Getting distribution for 'zope.security'.
warning: no previously-included files matching '.dll' found anywhere in distribution
warning: no previously-included files matching '
.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
src/zope/proxy/_zope_proxy_proxy.c:212:7: warning: implicit conversion loses
integer precision: 'long' to 'int' [-Wshorten-64-to-32]
- 1; /* We don't want to look at the last item, which is object. */
^~~
1 warning generated.

Installed /private/tmp/easy_install-xga4Ic/zope.security-4.2.2/.eggs/zope.proxy-4.3.0-py2.7-macosx-10.13-intel.egg
Searching for zope.interface
Reading https://pypi.python.org/simple/zope.interface/
Best match: zope.interface 4.5.0
Downloading https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz#sha256=57c38470d9f57e37afb460c399eb254e7193ac7fb8042bd09bdc001981a9c74c
Processing zope.interface-4.5.0.tar.gz
Writing /tmp/easy_install-xga4Ic/zope.security-4.2.2/temp/easy_install-c3Jjj1/zope.interface-4.5.0/setup.cfg
Running zope.interface-4.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xga4Ic/zope.security-4.2.2/temp/easy_install-c3Jjj1/zope.interface-4.5.0/egg-dist-tmp-WQAIQJ
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
warning: no previously-included files matching '.dll' found anywhere in distribution
warning: no previously-included files matching '
.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
warning: no previously-included files matching 'coverage.xml' found anywhere in distribution
warning: no previously-included files matching 'appveyor.yml' found anywhere in distribution
no previously-included directories found matching 'docs/_build'
src/zope/interface/_zope_interface_coptimizations.c:587:7: warning: implicit
conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int'
[-Wshorten-64-to-32]
l = PyList_GET_SIZE(adapter_hooks);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/listobject.h:63:32: note:
expanded from macro 'PyList_GET_SIZE'
#define PyList_GET_SIZE(op) Py_SIZE(op)
^~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:116:56: note:
expanded from macro 'Py_SIZE'
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
^
src/zope/interface/_zope_interface_coptimizations.c:1356:7: warning: implicit
conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int'
[-Wshorten-64-to-32]
l = PyTuple_GET_SIZE(ro);
~ ^
~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/tupleobject.h:51:33: note:
expanded from macro 'PyTuple_GET_SIZE'
#define PyTuple_GET_SIZE(op) Py_SIZE(op)
^~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:116:56: note:
expanded from macro 'Py_SIZE'
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
~~~~~~~~~~~~~~~~^
2 warnings generated.

Installed /private/tmp/easy_install-xga4Ic/zope.security-4.2.2/.eggs/zope.interface-4.5.0-py2.7-macosx-10.13-intel.egg
error: Setup script exited with error in zope.security setup command: Invalid environment marker: python_version >= "3.3"
An error occurred when trying to install /tmp/tmpAOWNVUget_dist/zope.security-4.2.2.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing.
Uninstalling instance.
Installing recipe plone.recipe.zope2instance.
Getting distribution for 'zope.security'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 2123, in main
getattr(buildout, command)(args)
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 735, in install
self._uninstall_part(part, installed_part_options)
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 853, in _uninstall_part
recipe, 'zc.buildout.uninstall', entry, self)
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 1338, in _install_and_load
allow_hosts=buildout._allow_hosts
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 714, in install
for dist in self._get_dist(req, ws):
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/Applications/Plone/zinstance/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
(myenv) imacfixs-MacBook-Air:zinstance imacfix$

something seems very wrong here and you should fix that first, everything that follows can only go downhill after that.

Plone 5.1 has 4.4 version for zope.interface. Plone 4.3.17 has 3.6. There is something missing from your config that should limit the research on pypi to package versions compatibles with your elderly Plone version. I don't think Plone 4 can work well with shiny new Zope.

From a Plone 4.3 install, it seems that you should have something along the lines of
extends =
https://dist.plone.org/release/4.3.xxxx/versions.cfg
in your buildout with xxxx as your base config version.

you should post your config so that the buildout experts can take a look.

1 Like