Merged PRs on unified installer

I've been trying to update the unified installer to work with Plone 5.2.2 but keep running into errors like this:

Installing Plone 5.2.2 at /Users/kimadmin/Plone522

Creating Python virtual environment.

Failed to create virtual environment for /usr/bin/python

$ cat install.log 
Detailed installation log
Starting at Mon Sep  7 08:47:29 CDT 2020
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/ can't open file '': [Errno 2] No such file or directory

or variations like that, whether on macOS or Ubuntu (18.04 LTS).

The 5.2.1 unified installer does not have that problem.

@agitator @jensens you merged some PRs at

What am I missing?

When I look at the changes of the last commit: (

virtualenv was upgraded from 16.X to 20.X in the . And the packge names where changd from pypa-virtualenv to virtualenv . Maybe that gives problems to install virtualenv on some systems/OS'es?

Well, virtualenv versions should be consistent. But if we need different virtualenv for different target systems, then we need to configure this universally here. For Windows and Ubuntu 20.04 the v16 was not sufficient IIRC. With all the changes done, the installer runs basically on Windows at least.

IMO the whole installer needs lots more love. It targets absolute beginners and so should be bulletproof.

I am happy to help here with setting up some basic build-testing with GH actions (later this week please).

Ok thanks for clarifying that. Have you uploaded these to launchpad? I will try to figure out how to have different dependencies but it would be good to indicate which platforms have been tested with

No, we just tested locally.

The problem is around this line


which expects a file to be present after untar'ing the virtualenv-*.tgz. That is true for virtualenv 16 but not 20.

... wondering how this could even run on any OS if the file is missing

This is on Ubuntu 20.04 LTS:

$ ./ --with-python=`which python3` standalone

Testing /usr/bin/python3 for Zope/Plone requirements....
/usr/bin/python3 looks OK. We will use it.

Rootless install method chosen. Will install for use by system user ubuntu

Detailed installation log being written to /home/ubuntu/Plone-5.2.2-UnifiedInstaller/insta
Installing Plone 5.2.2 at /home/ubuntu/Plone

Creating Python virtual environment.

Failed to create virtual environment for /usr/bin/python3
ubuntu@ip-172-26-10-101:~/Plone-5.2.2-UnifiedInstaller$ cat install.log
Detailed installation log
Starting at Sat Sep 12 16:00:12 UTC 2020
/usr/bin/python3: can't open file '': [Errno 2] No such file or directory

On Windows 10. I guess this doesn't work with Python 2.

Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>windows_install.bat standalone --password=admin

C:\Users\myuser\Downloads\Plone-5.2.2-UnifiedInstaller>python helper_scripts\ standalone --password=admin
Traceback (most recent call last):
  File "helper_scripts\", line 11, in <module>
    from .i18n import _
ValueError: Attempted relative import in non-package

Same with Python 3.8.5... not sure what I'm missing on Windows.

I'm stuck at the moment: I don't have this 5.2.2 unified installer working on Ubuntu 20 LTS or Windows 10, so I don't have a working base from which to test my changes so that it will work on macOS or Ubuntu 18 LTS.

If I change the installer to use

readonly VIRTUALENV_TB=virtualenv-16.7.8.tar.gz
readonly VIRTUALENV_DIR=pypa-virtualenv-c85afa5

then it works on macOS and Ubuntu 20 LTS

...and on Ubuntu 18 LTS

I know that I don't like virtualenv 20 because I sometimes use virtualenv --clear to throw away old directories like bin and lib before creating the environment fresh. But with version 20 this throws away the entire current directory. I have been bitten by that a few times. Sure, a bump from 16 to 20 may mean breaking changes, but this is a bit too much breaking for me...
This particular problem does not explain the UniversalInstaller problems you see. But I don't mind staying at version 16.

I am happy that changes were done to get better support on Windows, but if that means it no longer works on Ubuntu and Mac, then this seems a good reason to revert.

The Plone 5.2.2 unified installer is now linked from (tested on macOS Catalina 10.15, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS)

1 Like

I think the idea of virtualenv is to be complete reversible w/o having any side effects. Ergo, it's perfect to wipe the whole env on clear. So, our way of mixing virtualenv and buildout in one directory is probably wrong. I tend to avoid this, either by putting virtualenv in a ./py/ subdirectory or (on my machine) by using pyenv and pyenv-virualenv.