Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Steve's Blog / Building Plone on Windows 10

Building Plone on Windows 10

Posted by Steve McMahon at Apr 01, 2016 11:55 PM |
Filed under:
It's really not hard. Some problems remain.

The date on this post might encourage some to think it's an April Fools' joke. It's not! It's really not hard to build Plone on Windows 10. (Ironically, I'd say it's somewhat easier than doing it with El Capitan.)

Preliminary steps

  1. Download and install the latest Python 2.7.10 for Windows. Python 2.7.11 is offered, but in my testing, the 2.7.11 installer failed to set the Windows registry entries required to install the Python Extensions for Windows.*
  2. Download and install the matching Python Extensions for Windows.
  3. Download and install Microsoft Visual C++ Compiler for Python 2.7. This is a relatively new, free version of VC++ that provides everything needed to build Python binary wheels and eggs. In my experience, it just plain works.

On to the command line

All the major parts are now in place. Open a command prompt.

Install zc.buildout for your Python

The command is:

C:\Users\steve> \Python27\Scripts\pip install zc.buildout

If your Python install is in a different location, adjust the command lines.

Create a directory for your Plone install; add a buildout.cfg**

C:\Users\steve> mkdir Plone
C:\Users\steve> cd Plone
C:\Users\steve> notepad buildout.cfg

Run buildout

C:\Users\steve> \Python27\Scripts\buildout

You may occasionally have buildout stop with "Access denied" messages. Just run it again. It looks like Windows 10 doesn't like it when a file is written, then rapidly renamed.

Run Plone!

C:\Users\steve> bin\instance fg

or

C:\Users\steve> bin\instance console

for debug/development mode or normal running.

Hacks

Adjustments for Plone 4.3.x

The Python setup build for lxml fails trying to compile the binary parts of the version of lxml specified for Plone 4.3.x. Never fear. Just add "lxml = 3.5.0" to the [versions] specification and it will load a version that does work.

No adjustment is needed for Plone 5.0.x.

What doesn't work

Update: the problem described in this section has been fixed. It was a bug in Dexterity's image scaling.

You probably guessed that there's a gotcha, and it's a big one. There's something wrong between Windows 10 and Plone's image scaling. Attempts to scale uploaded images provokes errors:

WindowsError [Error 32]: The process cannot access the file because it is being used by another process: '...'

where "..." is the address of a temporary file and the previous step in the traceback is "rename_or_copy_blob" (line 892 in ZODB.blob).

This problem does not occur with Plone 4.3.x, so I'm guessing that it's an unfortunate collision between optimizations in Windows 10 and Plone 5.0.x. I spent a good bit of time trying to track this down, but failed. There have been a lot of complaints on Windows dev lists about similar errors, usually followed by a suggestion that a file must not have been closed to Windows 10's satisfaction. Sound similar to the "Access denied" problem?

I'm hoping that someone with more experience with the image scaling routines will have some idea what's wrong.


* If you have a problem with the Windows registry, the attached regedit file may help you fix it.

** The buildout I used -- nothing fancy. Substitute 4.3 for 5.0 to try 4.3.8. The "lxml = ..." line is not needed with Plone 5.

[buildout]
extends =
http://dist.plone.org/release/5.0-latest/versions.cfg

parts = instance
versions = versions

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
Pillow

[versions]
lxml = 3.5.0