Plone 5.2.X and python 3.X on Windows

Hello ,
Does anyone know if it will be possible in the near future to install Plone 5.2.X series on Windows?
And at the same time to be able to use python 3.X with Plone under Windows?
Thanks in advance.

Yes!

The plan is to have 5.2.2/Python 2.7/3.6-3.8 ready for Windows. Thus said, the buildout.coredev 5.2 branch already works on Windows again with one manual step. I described the process here:

The installer was also fixed (for next 5.2.2. release), also there were fixes in plone.recipe.zope2instance (but one big issue pending here, workaround available - see my referenced posting above) and also in plone.recipe.zeoserver. I also introduced workflows for Github Actions to at least do some basic automated checks on windows. I fixed z3c.jbot to work on Windows. Most of the changes are merged but unreleased for now, so the git branches must be used to make it work.

So we made good progress - that said any help and real world testing would help to get this more polished.

With all this developing for Plone with buildout.coredev works fine. For production I would wait for the 5.2.2 release.

We really need more people helping with Windows issues. While porting Plone to Python 3 we had MacOS and Linux people on board, but nobody developing on Windows. I have to admit, Windows support was not on focus. Also our CI worked at the time on Linux only. Now this falls back on us.
Any help is here highly appreciated!

If you can not wait, Plone works fine in the Windows Linux Subsystem:
https://docs.plone.org/manage/installing/installation_windows10_wsl.html

2 Likes

ello,
@jensens you have indeed done a lot of work to advance the port of Plone 5.2.2 under Windows.
I'm not sure I understand what to expect from people who want to test.
If I understood correctly, I would be willing to try testing.
Otherwise, I can wait for version 5.2.2 to be Windows compatible before installing it for tests and then on a server and thereby consider, if necessary, production use.
Thanks for all the hard work.

thanks @Adomy - a minimal test would be great!

  1. open an Administrator PowerShell
  2. create a folder somewhere and cd into it.
  3. create a minimal buildout.cfg in the folder containing
    [buildout]
    extends = https://dist.plone.org/release/5.2.2/versions.cfg
    parts = instance
    
    [instance]
    recipe = plone.recipe.zope2instance
    user = admin:admin
    eggs = Plone
    
  4. ensure Python 3.6 or later (like 3.8) is installed
  5. python -mvenv py to create a local virtual environment
  6. install buildout and other dependencies with .\py\Scripts\pip.exe install -r https://dist.plone.org/release/5.2.2/requirements.txt
  7. run buildout: .\py\Scripts\buildout.exe
  8. do you get PermissionErrors here? If so re run buildout. I am curious if you got some.
  9. start Plone with .\bin\runwsgi.exe -v parts/instance/etc/wsgi.ini (for debug mode add -d to the -v).

If this works, Plone works on Windows. This all without the UnifiedInstaller, which was not tested with 5.2.2 and the modifed plone.recipe.zope2instance and without having a bin/instance script (which is not that essential).

I am looking forward for your installation test report - and for many other peoples reports too - hope so :wink:

I'm very much interested interested in getting this to work on Windows. I already had a working barebones buildout on a py3.6 venv there which was able to at least run unit tests. From here ran pip install -r https://dist.plone.org/release/5.2.2/requirements.txt with it the venv activated. I changed the extends to https://dist.plone.org/release/5.2.2/versions.cfg and reran buildout.

I don't get any errors but I also don't have a runwsgi executable. Full disclosure: I did not run as Administrator because I do not have that permission on my work Windows computer (personal is Mac) per company policies/contracts. This is also what precluded me from being able to use VirtualBox or other solutions. If the admin permission here is not likely to be the cause of missing the runwsgi (I don't see any error messages about it) I would love to help debug this more.

See my post Install buildout and other dependencies
With the [zopescripts] section from over there the runwsgi script will be generated.

This all was tested with the free 90day IE/Edge image VM provided by Microsoft. I am not sure if this one runs in Administrator mode (probably not).

Thanks Jens, this is working for me now. I did not need to run anything as Administrator. Looks great!

FYI it's "parts/instance/etc/wsgi.ini" at least for me

I am once again forced to delve into the world of Windows. It looks like my runwsgi script isn't picking up any of my develop eggs in src/. How does it determine which eggs to use? I only have one part defined with the plone.recipe.zope2instance and it doesn't seem to be using its defined eggs.

If the zopescripts section contains them in its eggs = ... (or dependencies of them), in theory they should get then included.

1 Like

Plone522 installation on Windows 10

I tried to go through the @jensens process from start to finish.

Problems:

  1. Instead of
[buildout] 
extends =
    https://dist.plone.org/release/5.2.2/versions.cfg 
parts = zopescripts instance 

I must have written:

[buildout] 
extends =
    https://dist.plone.org/release/5.2.2/versions.txt 
parts = zopescripts instance

for it to work.`

Indeed, I noticed that at the given URL address, we did not have versions.cfg but rather versions.txt

  1. After that, I was able to move forward to:
    . \ Py \ Scripts \ buildout.exe but I got the following error message:

PS E: \ Plone522>. \ Py \ Scripts \ buildout.exe While: Initializing. Error: Couldn't open E: \ Plone522 \ buildout.cfg PS E: \ Plone522>

So I can't go any further.

Any ideas?

Thanks in advance

P.S.: I use python 3.8.6

@Adomy It is very difficult for me to follow your steps. Can you take screenshots from every step and post them here? Also a dir of the E: \ Plone522 folder and the full contents of the buildout.cfg would help a lot.

https://dist.plone.org/release/5.2.2/versions.cfg is correct. If it ends with the txt extension that is probably meant for venv requirements and not the URI you want for this.

Hello to all the community
Sorry @jensens: your procedure is working perfectly.
I made a mistake typing "build.cfg" instead of "buildout.cfg" :-)!
I am using python 3.8.6 and Visual Studio 2019.
I think it's necessary the same way we
had Microsoft Visual C ++ Compiler for Python 2.7 to install plone 4.3.1 on Windows.
There it is, thanks. It is a great job that you have done!

Now I'll try to associate it with a Windows service to avoid having to keep PowerShell or the Command Prompt open every time I use it.
Do you think there are any special precautions to successfully install a Windows service?

Thanks in advance.

Plone522 installation on Windows 10: the continuation.

After a successful installation of Plone 522 following the @jensens procedure, I

unsuccessfully try to reproduce the installation on a second computer, but to no avail. Indeed during the installation I have an error message that you can examine. Oddly enough, I also note this error message: "error: Setup script exited with error: Microsoft Visual C ++ 14.0 is required. Get it with" Build Tools for Visual Studio ": https://visualstudio.microsoft.com/downloads/" However, Visual studio 2019 is installed on this computer, just like the one where the installation was successful. In reality "Microsoft Visual C ++ 14.0" is the internal indication of visual studio 15 and that normally visual studio 2019 installed is backward compatible with VS2015. The best proof, it worked on the first computer. anyone has any idea where these two error messages came from:
-that concerning visual studio
-the final error message.

Thanks in advance.

Below is the result

"Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.

Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6

PS C:\WINDOWS\system32> New-Item "E:\Plone522" -itemType Directory

RĂ©pertoire : E:\

Mode LastWriteTime Length Name


d----- 17/12/2020 18:27 Plone522

PS C:\WINDOWS\system32> Set-Location c:
PS C:> E:

PS E:> cd Plone522
PS E:\Plone522> notepad buildout.cfg
PS E:\Plone522> py.exe -m venv py
PS E:\Plone522> ls py

RĂ©pertoire : E:\Plone522\py

Mode LastWriteTime Length Name


d----- 17/12/2020 18:36 Include
d----- 17/12/2020 18:36 Lib
d----- 17/12/2020 18:36 Scripts
-a---- 17/12/2020 18:36 75 pyvenv.cfg

PS E:\Plone522> .\py\Scripts\pip.exe install -r https://dist.plone.org/release/5.2.2/requirements.txt
Ignoring ntfsutils: markers 'platform_system == "Windows" and python_version < "3.0"' don't match your environment
Collecting setuptools==42.0.2
Using cached setuptools-42.0.2-py2.py3-none-any.whl (583 kB)
Collecting zc.buildout==2.13.3
Using cached zc.buildout-2.13.3-py2.py3-none-any.whl (153 kB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting pywin32
Using cached pywin32-300-cp38-cp38-win_amd64.whl (9.3 MB)
Installing collected packages: setuptools, zc.buildout, wheel, pywin32
Attempting uninstall: setuptools
Found existing installation: setuptools 49.2.1
Uninstalling setuptools-49.2.1:
Successfully uninstalled setuptools-49.2.1
Successfully installed pywin32-300 setuptools-42.0.2 wheel-0.36.2 zc.buildout-2.13.3
WARNING: You are using pip version 20.2.1; however, version 20.3.1 is available.
You should consider upgrading via the 'e:\plone522\py\scripts\python.exe -m pip install --upgrade pip' command.
PS E:\Plone522> py\scripts\python.exe -m pip install --upgrade pip
Collecting pip
Using cached pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.1
Uninstalling pip-20.2.1:
Successfully uninstalled pip-20.2.1
Successfully installed pip-20.3.3
PS E:\Plone522> .\py\Scripts\buildout.exe
Creating directory 'E:\Plone522\eggs'.
Creating directory 'E:\Plone522\bin'.
Creating directory 'E:\Plone522\parts'.
Creating directory 'E:\Plone522\develop-eggs'.
Getting distribution for 'plone.recipe.zope2instance==6.7.5'.
Got plone.recipe.zope2instance 6.7.5.
Getting distribution for 'zc.recipe.egg==2.0.7'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
Got zc.recipe.egg 2.0.7.
Getting distribution for 'waitress==1.4.4'.
Got waitress 1.4.4.
Getting distribution for 'six==1.15.0'.
Got six 1.15.0.
Getting distribution for 'Zope==4.5.1'.
Got zope 4.5.1.
Getting distribution for 'ZODB==5.6.0'.
Got zodb 5.6.0.
Getting distribution for 'ZEO==5.2.2'.
Got zeo 5.2.2.
Getting distribution for 'Paste==3.4.1'.
Got paste 3.4.1.
Getting distribution for 'zope.viewlet==4.2.1'.
Got zope.viewlet 4.2.1.
Getting distribution for 'zope.traversing==4.4.1'.
Got zope.traversing 4.4.1.
Getting distribution for 'zope.testing==4.7'.
Got zope.testing 4.7.
Getting distribution for 'zope.testbrowser==5.5.1'.
Got zope.testbrowser 5.5.1.
Getting distribution for 'zope.tales==5.1'.
Got zope.tales 5.1.
Getting distribution for 'zope.tal==4.4'.
Got zope.tal 4.4.
Getting distribution for 'zope.size==4.3'.
Got zope.size 4.3.
Getting distribution for 'zope.site==4.3.0'.
Got zope.site 4.3.0.
Getting distribution for 'zope.sequencesort==4.1.2'.
Got zope.sequencesort 4.1.2.
Getting distribution for 'zope.security==5.1.1'.
Got zope.security 5.1.1.
Getting distribution for 'zope.schema==6.0.0'.
Got zope.schema 6.0.0.
Getting distribution for 'zope.publisher==5.2.1'.
Got zope.publisher 5.2.1.
Getting distribution for 'zope.ptresource==4.2.0'.
Got zope.ptresource 4.2.0.
Getting distribution for 'zope.proxy==4.3.5'.
Got zope.proxy 4.3.5.
Getting distribution for 'zope.processlifetime==2.3.0'.
Got zope.processlifetime 2.3.0.
Getting distribution for 'zope.pagetemplate==4.5.0'.
Got zope.pagetemplate 4.5.0.
Getting distribution for 'zope.location==4.2'.
Got zope.location 4.2.
Getting distribution for 'zope.lifecycleevent==4.3.0'.
Got zope.lifecycleevent 4.3.
Getting distribution for 'zope.interface==5.0.2'.
Got zope.interface 5.0.2.
Getting distribution for 'zope.i18nmessageid==5.0.1'.
Got zope.i18nmessageid 5.0.1.
Getting distribution for 'zope.i18n[zcml]==4.7.0'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
Got zope.i18n 4.7.0.
Getting distribution for 'zope.globalrequest==1.5'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
warning: no files found matching '.txt'
warning: no previously-included files matching '
.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
Got zope.globalrequest 1.5.
Getting distribution for 'zope.exceptions==4.3'.
Got zope.exceptions 4.3.
Getting distribution for 'zope.event==4.4'.
Got zope.event 4.4.
Getting distribution for 'zope.deferredimport==4.3.1'.
Got zope.deferredimport 4.3.1.
Getting distribution for 'zope.contenttype==4.5.0'.
Got zope.contenttype 4.5.0.
Getting distribution for 'zope.contentprovider==4.2.1'.
Got zope.contentprovider 4.2.1.
Getting distribution for 'zope.container==4.4.0'.
Got zope.container 4.4.0.
Getting distribution for 'zope.configuration==4.4.0'.
Got zope.configuration 4.4.0.
Getting distribution for 'zope.component==4.6.2'.
Got zope.component 4.6.2.
Getting distribution for 'zope.browserresource==4.4'.
Got zope.browserresource 4.4.
Getting distribution for 'zope.browserpage==4.4.0'.
Got zope.browserpage 4.4.0.
Getting distribution for 'zope.browsermenu==4.4'.
Got zope.browsermenu 4.4.
Getting distribution for 'zope.browser==2.3'.
Got zope.browser 2.3.
Getting distribution for 'zExceptions==4.1'.
Got zexceptions 4.1.
Getting distribution for 'z3c.pt==3.3.0'.
Got z3c.pt 3.3.0.
Getting distribution for 'transaction==3.0.0'.
Got transaction 3.0.0.
Getting distribution for 'ZConfig==3.5.0'.
Got zconfig 3.5.0.
Getting distribution for 'RestrictedPython==5.0'.
Got restrictedpython 5.0.
Getting distribution for 'Persistence==3.0'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
warning: no files found matching 'appveyor.yml'
warning: no previously-included files found matching 'appveyor.yml'
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
error: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
An error occurred when trying to install C:\Users\Mahatma\AppData\Local\Temp\tmpjbsdmmn8get_dist\Persistence-3.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing.
Getting section instance.
Initializing section instance.
Installing recipe plone.recipe.zope2instance.
Getting distribution for 'Persistence==3.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 "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 2174, in main
getattr(buildout, command)(args)
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 701, in install
[self[part]['recipe'] for part in install_parts]
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 701, in
[self[part]['recipe'] for part in install_parts]
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 1324, in getitem
options._initialize()
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 1432, in _initialize
self.initialize()
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 1438, in initialize
recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
File "e:\plone522\py\lib\site-packages\zc\buildout\buildout.py", line 1381, in _install_and_load
zc.buildout.easy_install.install(
File "e:\plone522\py\lib\site-packages\zc\buildout\easy_install.py", line 957, in install
return installer.install(specs, working_set)
File "e:\plone522\py\lib\site-packages\zc\buildout\easy_install.py", line 730, in install
for dist in self._get_dist(req, ws):
File "e:\plone522\py\lib\site-packages\zc\buildout\easy_install.py", line 574, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "e:\plone522\py\lib\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)
PS E:\Plone522>"

Yes, this indicates the Python environment inside of Powershell does not find the installed Microsoft Visual C++. Probably the compiler executable is not in the search path? I have no idea why. I would try to reinstall Microsoft Visual C++ 14.0 - but people more expert in Windows as I would probably come up with a more elegant solution.

We had the same problem on Windows in our company.
We could successfully run buildout after we made sure "Python development" and "C++ desktop development" had been activated in Visual Studio (a Windows restart might be required after changing the settings in Visual Studio).

1 Like

Plone Foundation Code of Conduct