Error Buildout Plone 4.3.11 with python 2.7 in ubuntu 18.04

789 Views Asked by At

Does anyone know how I can fix this error that I get when I do a buildout?
sudo -u plone_buildout bin/buildout
this error appeared

Develop: '/usr/local/Plone/zeocluster/src/bika.lims'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Develop: '/usr/local/Plone/zeocluster/src/baobab.lims'
Develop: '/usr/local/Plone/zeocluster/src/graphite.theme'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Updating zeoserver.
Installing client1.
/usr/local/Plone/buildout-cache/eggs/setuptools-30.3.0-py2.7.egg/pkg_resources/__init__.py:184: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,
Develop distribution: graphite.theme 1.2
uses namespace packages but the distribution does not require setuptools.
Download error on http://dist.plone.org: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://effbot.org/downloads: hostname 'effbot.org' doesn't match either of 'www.github.com', '*.github.com', 'github.com', '*.github.io', 'github.io', '*.githubusercontent.com', 'githubusercontent.com' -- Some packages may not be found!
Couldn't find index page for 'collective.wtf' (maybe misspelled?)
Getting distribution for 'collective.wtf'.
Couldn't find index page for 'collective.wtf' (maybe misspelled?)
While:
  Installing client1.
  Getting distribution for 'collective.wtf'.
Error: Couldn't find a distribution for 'collective.wtf'.
3

There are 3 best solutions below

0
fulv On

See here: https://community.plone.org/t/pypi-deprecation-of-support-for-non-sni-clients-breaks-buildout-for-older-plone-versions

Your log shows you have setuptools 30.3.0. That is too old. You need to use a version of setuptools between 36.8.0 and 44.1.1.

2
WebMobile Nailiapps On

1- i install setuptools 44.1.1 and zc.buildout 2.13.1

baobab20@baobab20-VirtualBox:/usr/local/Plone/zeocluster$ pip list

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Package     Version
pip         20.3.4
setuptools  44.1.1
wheel       0.37.0
zc.buildout 2.13.1

2- i modify buildout.cfg

[versions]
zc.buildout = 2.13.1
setuptools = 44.1.1
Pillow = 3.4.2
Products.PloneHotfix20160830 = 1.3
Products.PloneHotfix20161129 = 1.2
MarkupSafe = 0.23
Products.DocFinderTab = 1.0.5
bobtemplates.plone = 1.0.5
buildout.sanitycheck = 1.0.2
collective.checkdocs = 0.2
collective.recipe.backup = 3.0.0
mr.bob = 0.1.2
pkginfo = 1.4.1
plone.recipe.unifiedinstaller = 4.3.2
requests = 2.12.3
requests-toolbelt = 0.7.0
twine = 1.8.1
zest.pocompile = 1.4

3- i try to buildout,this error appeared :

baobab20@baobab20-VirtualBox:/usr/local/Plone/zeocluster$ sudo -u plone_buildout bin/buildout

Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://effbot.org/downloads: hostname 'effbot.org' doesn't match either of 'www.github.com', '*.github.com', 'github.com', '*.github.io', 'github.io', '*.githubusercontent.com', 'githubusercontent.com' -- Some packages may not be found!
Getting distribution for 'setuptools==44.1.1'.
While:
Installing.
Loading extensions.
Getting distribution for 'setuptools==44.1.1'.
Error: Couldn't find a distribution for 'setuptools==44.1.1'.
0
Nicola On

Based on the answer from @webmobile-nailiapps , I was able to have it working (same problem with 4.3.18).

  1. I checked (by using the Plone pip) the version of setuptools and zc.buildout were already the suggested ones:
zinstance# ../Python-2.7/bin/pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Package    Version
---------- -------
pip        20.3.4
setuptools 44.1.1
wheel      0.37.1
  1. I updted buildout.cfg:
--- buildout.cfg.orig   2022-11-25 06:56:34.771083040 +0000
+++ buildout.cfg    2022-11-25 06:41:35.435275637 +0000
@@ -231,8 +231,10 @@
 # config files.
 #
 [versions]
-zc.buildout = 2.5.3
-setuptools = 27.3.0
+zc.buildout = 2.13.1
+setuptools = 44.1.1
 Pillow = 5.1.0

 buildout.sanitycheck = 1.0.2
  1. Since there is a chicken and egg problem, I had to manually download setuptools:
zinstance# ../Python-2.7/bin/pip download -d ../buildout-cache/downloads/dist/ setuptools==44.1.1 --no-binary ":all:"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting setuptools==44.1.1
  Downloading setuptools-44.1.1.zip (858 kB)
     |████████████████████████████████| 858 kB 7.8 MB/s
Saved /mnt/opt/Plone-4.3.18/buildout-cache/downloads/dist/setuptools-44.1.1.zip
Successfully downloaded setuptools
  1. Invalidate the existing egg:
zinstance# mv -vi ../buildout-cache/eggs/setuptools-27.3.0-py2.7.egg ../buildout-cache/eggs/setuptools-27.3.0-py2.7.egg.no

At this point it can find the required packages without the SNI/Download error.