Running Plone 4.3.1 under Python 2.7 and Windows

Hello community,

i was told in previous topics that Plone 4.3 would run under python 2.7 thus that is what i was trying to do.

I have an old Plone 4.3.1 installation, which was created by a windows installer using python 2.6. I have a huge site with lot of extensions (created using archgenxml and archetypes) thus just changing to Plone 5 is not an option right now.

I would like to run the current installation under python 2.7 to have access to newer python modules, that do not support python 2.6.

I simply tried the following:

  1. Install Python 2.7
  2. Run python C:\Plone43\bin\run-instance-script.py

which gives me the following error message:

Traceback (most recent call last):
File "C:\Plone43\bin\run-instance-script.py", line 251, in
import Zope2.Startup.run
File "c:\plone43\eggs\zope2-2.13.20-py2.6.egg\Zope2_init_.py", line 60, in
from Zope2.Startup.run import configure
File "c:\plone43\eggs\zope2-2.13.20-py2.6.egg\Zope2\Startup_init_.py", line 28, in
from zope.processlifetime import ProcessStarting
ImportError: No module named processlifetime

This is weird, because Startup_init_.py looks like this:

...
27: from zope.event import notify
28: from zope.processlifetime import ProcessStarting
...

Thus the module zope.event is found, the module zope.processlifetime is not found.
Both eggs are added to the sys.path in "run-instance-script.py".

Thus what am i missing?

Thanks!

Plone 4.3 definitely runs under Python 2.7.

Your error message still references "py2.6" eggs (see the -py2.6.egg infixes in the traceback). This might explain your problem.

I recommend that you follow the guidelines for a major upgrade - even if you only want to upgrade Python, i.e. make a new install of Plone 4.3 (which should already use Python 2.7); copy your buildout configuration; copy your "Data.fs"; run bin\buildout.

Hi Dieter,

thank you for your reply. The problem with Plone 4.3 is that since 4.3.1 there are no installers for windows. Thus there is no easy way to install a Plone 4.3.x that uses Python 2.7. The new mechanism seems to use a virtual machine (Vagrant?).

Thus i just wanted to run my current 4.3.1 with Pyhton 2.7. I was assuming that Python 2.7 is backwards compatible with 2.6, which i still assume. I assume that the py2.6 eggs also run under 2.7 and if not then i get some kind of a deprication warning or error.

My error is a simple "module not found" which is odd.

Then you might try to install an earlier Plone version with Windows installer, already using Python 2.7. I am actively using Plone 4.2 and I know that it is using Python 2.7.

Unfortunately, I know no Windows details, and especially no details about Plone's Windows installer. If it uses buildout, it is very easy to make upgrades: just change the versions related part of the extends definition in plone.cfg (a comment there suggests how to do that); then run bin\buildout.

There is no plone.cfg but there is a buildout.cfg. I changed the version from 4.3.1 to 4.3.2 just to try a minor upgrade.
Process started but ended quickly with this:

C:\Plone43>bin\buildout.exe
Getting distribution for 'plone.recipe.zope2instance==4.2.13'.
warning: no previously-included files matching 'pyc' found anywhere in distribution
Got plone.recipe.zope2instance 4.2.13.
Getting distribution for 'Zope2==2.13.21'.
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
Installing Zope2 2.13.21
Caused installation of a distribution:
zope2 2.13.21
with a different project name.
Got zope2 2.13.21.
Getting distribution for 'AccessControl==3.0.8'.
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: Unable to find vcvarsall.bat
An error occurred when trying to install AccessControl 3.0.8. 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 'AccessControl==3.0.8'.
Error: Couldn't install: AccessControl 3.0.8
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

That's sad. It likely means that there is either a bug in the AccessControl distribution (affecting only Windows) or its installation requires infrastructure not available on your computer (AccessControl contains extensions implemented in C; therefore, a (special) C compiler is needed - together with appropriate support components). As mentioned earlier, I cannot really help you with Windows specific problems.

vcvarsall.bat is an environment variable setup script provided by Visual Studio. Which exact version of Visual Studio you might need for that specific version of AccessControl, I cannot tell.

@tkimnguyen what happened to the new Windows installer from last year's GSoC?

Extensions typically do not have their own requirements regarding compiler versions. Typically, the compiler version used to compile Python is adequate for all extensions for that Python.

The Plone Windows installer was for Plone 5 on Windows 10 I think. It was an GSoC 2017 idea but wasn't taken up by any GSoC students; instead I got @kyleArthurs to take it on, and he got it working, but changes in Windows have broken it and he hasn't been able to get it working again.

@OldPloneUser the simple buildout method has worked for me on Windows, but it was set up for Plone 5... might work if you try to change the version numbers, in https://github.com/plone/simple-plone-buildout/tree/5.0.8

Currently, it looks as if a missing compiler installation (not the AccessControl version) is the cause for the failing buildout run.

Behind the scenes, the Plone Windows installer from last year essentially installed the Windows Linux subsystem then ran the Plone unified installer. @OldPloneUser, if your version of Windows supports it, that would be something to try "by hand".

Thank you all for the replies. Seems to me that i have no choice but to use the unified installer with a virtual machine running Linux. Can anyone recommend a Linux distribution, which works without problems?

Thanks

Any not too old distribution should work; personally, I use Ubuntu (16.04) without (Plone related) problems.

I had the same error and when I added

[versions]
lxml = 2.3

it works.

I tested it: If you change the version numbers in version.cfg and base.cfg, it woks with plone 4.3.x

1 Like

Thanks, i will try it. But for my understanding. I was assuming, that if i change the "extends" section in buildout.cfg to this:

extends =
base.cfg

versions.cfg

http://dist.plone.org/release/4.3.2/versions.cfg

then buildout does the job, gets the new versions.cfg, which now is not the case, because in versions.cfg the first line is still:

http://dist.plone.org/release/4.3.1/versions.cfg

However, no matter what i do, i still get the same error.

Added lxml=2.3 to the "versions" sections of buildout.cfg. However, in versions.cfg the lxml-version was already 2.3, thus i am not sure this would change anything.

I also downloaded the versions.cfg for 4.3.2 manually and replaced it locally. Still the same error.

I am switching to Ubuntu, this makes no sense.

Thanks for all the replies!

As far as I can see, your problem comes from a missing "VisualStudio" installation. For efficiency reasons AccessControl is implemented in "C"; therefore, a C compiler is necessary to "build" it locally. The required "C" compiler must be the one (not necessarily the same version - but the same brand) as was used to compile Python: apparently "VisualStudio". Reading the Python mailing list, I got the impression that there is a free stripped down version of "VisualStudio" which can be used to compile Python and its extensions.

An alternative would be to use a binary distribution of AccessControl for Windows. This might be available for some AccessControl versions (and not for others).

Of course, switching to Linux is also an alternative. Linux is much better supported by Plone as Windows. Thus, you can expect much less problems and much more help (in case of problems).

Interestingly there are two binary windows distributions for AccessControl 3.0.8 on Python 2.7 (the version @OldPloneUser wants to install), see AccessControl · PyPI.
But I cannot say why it is not used during the installation process.