Installing server Plone

I am installing server Plone, trying both python2.7 and python3.7. Installations are fine. However, when I buildout them, I got a strange error.

For the python2.7 version, I got:
File "/opt/plone27/buildout-cache/eggs/zodbpickle-2.0.0-py2.7-linux-x86_64.egg/zodbpickle/pickletools_3.py"...

For the python3.7 version, I got:
File "/opt/plone/buildout-cache/eggs/zodbpickle-2.0.0-py3.7-linux-x86_64.egg/zodbpickle/pickletools_2.py"...

You can see wrong pickletools versions are called.

How can I install them correctly, especially for python3.7?

Thanks,
peijun

By the way, my standalone version (python3, on the same Linux server) runs fine.

peijun

Is this an error or a message? Is your buildout failing? If yes, please provide the full error message

Hi zopyx,
Thanks for your help. Here is the error info:

For Plone 5.2.2 python 3.7:

 sudo -u plone_buildout bin/buildout
Uninstalling setpermissions.
Uninstalling precompiler.
Uninstalling unifiedinstaller.
Uninstalling zopepy.
Uninstalling backup.
Uninstalling client3.
Uninstalling client2.
Uninstalling client1.
Uninstalling zeoserver.
Installing zeoserver.
Created directory /opt/plone/zeocluster/parts/zeoserver
Created directory /opt/plone/zeocluster/parts/zeoserver/etc
Created directory /opt/plone/zeocluster/parts/zeoserver/var
Created directory /opt/plone/zeocluster/parts/zeoserver/log
Created directory /opt/plone/zeocluster/parts/zeoserver/bin
Wrote file /opt/plone/zeocluster/parts/zeoserver/etc/zeo.conf
Wrote file /opt/plone/zeocluster/parts/zeoserver/bin/zeoctl
Changed mode for /opt/plone/zeocluster/parts/zeoserver/bin/zeoctl to 750
Wrote file /opt/plone/zeocluster/parts/zeoserver/bin/runzeo
Changed mode for /opt/plone/zeocluster/parts/zeoserver/bin/runzeo to 750
Installing client1.
Generated script '/opt/plone/zeocluster/bin/client1'.
Generated interpreter '/opt/plone/zeocluster/parts/client1/bin/interpreter'.
Installing client2.
Generated script '/opt/plone/zeocluster/bin/client2'.
Generated interpreter '/opt/plone/zeocluster/parts/client2/bin/interpreter'.
Installing client3.
Generated script '/opt/plone/zeocluster/bin/client3'.
Generated interpreter '/opt/plone/zeocluster/parts/client3/bin/interpreter'.
Installing backup.
Generated script '/opt/plone/zeocluster/bin/backup'.
Generated script '/opt/plone/zeocluster/bin/snapshotbackup'.
Generated script '/opt/plone/zeocluster/bin/restore'.
Generated script '/opt/plone/zeocluster/bin/snapshotrestore'.
Installing zopepy.
Generated interpreter '/opt/plone/zeocluster/bin/zopepy'.
Installing unifiedinstaller.
Installing precompiler.
Compiling Python files.
  File "/opt/plone/buildout-cache/eggs/plone.staticresources-1.3.2-py3.7.egg/plone/staticresources/static/components/jqtree/_entries/insert.py", line 44
    print 'rename %s to %s' % (old_filename, new_filename)
                          ^
SyntaxError: invalid syntax

  File "/opt/plone/buildout-cache/eggs/plone.staticresources-1.3.2-py3.7.egg/plone/staticresources/static/components/jqtree/_entries/renumber.py", line 36
    print 'rename %s to %s' % (old_filename, new_filename)
                          ^
SyntaxError: invalid syntax

  File "/opt/plone/buildout-cache/eggs/zodbpickle-2.0.0-py3.7-linux-x86_64.egg/zodbpickle/pickle_2.py", line 882
    except _Stop, stopinst:
                ^
SyntaxError: invalid syntax

  File "/opt/plone/buildout-cache/eggs/zodbpickle-2.0.0-py3.7-linux-x86_64.egg/zodbpickle/pickletools_2.py", line 1803
    print "skipping %r: it doesn't look like an opcode name" % name
                                                           ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("skipping %r: it doesn't look like an opcode name" % name)?

  File "/opt/plone/buildout-cache/eggs/zodbpickle-2.0.0-py3.7-linux-x86_64.egg/zodbpickle/tests/pickletester_2.py", line 433
    x = [0, 1L, 2.0, 3.0+0j]
             ^
SyntaxError: invalid syntax

Compiling locale files.
Installing setpermissions.
setpermissions: Running '# Dummy references to force this to execute after referenced parts
echo /opt/plone/zeocluster/var/backups yes > /dev/null
chmod 600 .installed.cfg
# Make sure anything we've created in var is r/w by our group
find /opt/plone/zeocluster/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone/zeocluster/var -type f -exec chmod 660 {} \; 2> /dev/null
find /opt/plone/zeocluster/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone/zeocluster/var -type f -exec chmod 660 {} \; 2> /dev/null
chmod 754 /opt/plone/zeocluster/bin/*'

For Plone 5.2.2 python 2.7

sudo -u plone_buildout bin/buildout
Updating zeoserver.
Updating client1.
Updating client2.
Updating client3.
Updating backup.
Updating zopepy.
Updating unifiedinstaller.
Updating precompiler.
Compiling Python files.
  File "/opt/plone27/buildout-cache/eggs/zodbpickle-2.0.0-py2.7-linux-x86_64.egg/zodbpickle/pickletools_3.py", line 2049
    print("%5d:" % pos, end=' ', file=out)
                           ^
SyntaxError: invalid syntax

  File "/opt/plone27/buildout-cache/eggs/zodbpickle-2.0.0-py2.7-linux-x86_64.egg/zodbpickle/pickle_3.py", line 178
    def __init__(self, file, protocol=None, *, fix_imports=True):
                                             ^
SyntaxError: invalid syntax

  File "/opt/plone27/buildout-cache/eggs/zodbpickle-2.0.0-py2.7-linux-x86_64.egg/zodbpickle/tests/pickletester_3.py", line 142
    class use_metaclass(object, metaclass=metaclass):
                                         ^
SyntaxError: invalid syntax

Compiling locale files.
Updating setpermissions.
setpermissions: Running # Dummy references to force this to execute after referenced parts
echo /opt/plone27/zeocluster/var/backups yes > /dev/null
chmod 600 .installed.cfg
# Make sure anything we've created in var is r/w by our group
find /opt/plone27/zeocluster/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone27/zeocluster/var -type f -exec chmod 660 {} \; 2> /dev/null
find /opt/plone27/zeocluster/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone27/zeocluster/var -type f -exec chmod 660 {} \; 2> /dev/null
chmod 754 /opt/plone27/zeocluster/bin/*

For Plone 5.2.1 python 3.7

sudo -u plone_buildout bin/buildout
Getting distribution for 'persistent==4.5.0'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
WARNING: The directory '/usr/bin/false/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/usr/bin/false/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Traceback (most recent call last):
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/setup.py", line 137, in <module>
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 740, in finalize_options
    ep.load()(self)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 219, in cffi_modules
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
  File "persistent/_ring_build.py", line 22, in <module>
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/api.py", line 48, in __init__
ImportError: /tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/_cffi_backend.cpython-37m-x86_64-linux-gnu.so: failed to map segment from shared object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 2321, in main
    **kw
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 424, in run
    self.easy_install(spec, not self.no_deps)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 711, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 896, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1164, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1150, in run_setup
    run_setup(setup_script, args)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/setup.py", line 137, in <module>
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 740, in finalize_options
    ep.load()(self)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 219, in cffi_modules
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
  File "persistent/_ring_build.py", line 22, in <module>
  File "/tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/cffi/api.py", line 48, in __init__
ImportError: /tmp/easy_install-4udkacdf/persistent-4.5.0/.eggs/cffi-1.14.3-py3.7-linux-x86_64.egg/_cffi_backend.cpython-37m-x86_64-linux-gnu.so: failed to map segment from shared object
An error occurred when trying to install /opt/plone37/buildout-cache/downloads/dist/persistent-4.5.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
  Installing.
  Getting section zeoserver.
  Initializing section zeoserver.
  Installing recipe plone.recipe.zeoserver.
  Getting distribution for 'persistent==4.5.0'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 701, in install
    [self[part]['recipe'] for part in install_parts]
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 701, in <listcomp>
    [self[part]['recipe'] for part in install_parts]
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 1324, in __getitem__
    options._initialize()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 1432, in _initialize
    self.initialize()
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 1438, in initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/buildout.py", line 1388, in _install_and_load
    allow_hosts=buildout._allow_hosts
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/easy_install.py", line 730, in install
    for dist in self._get_dist(req, ws):
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/opt/plone37/zeocluster/lib/python3.7/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: not enough values to unpack (expected 1, got 0)

I think there are two issues:

a) the errors at the beginnings are just warnings

b) something with libcffi...had some similar issue after an Ubuntu upgrade...I had to recompile/re-install a buildout

Plone Foundation Code of Conduct