WeasyPrint error while installing Senaite.health

Hi, I tried installing Senaite.helath with Plone 4.3.15 and 4.3.6 with this develop.cfg:
[buildout]

extends =
    base.cfg
    versions.cfg

find-links +=
    http://dist.plone.org/release/4.3.6


effective-user = senaite

buildout-user = senaite

need-sudo = no


eggs =
    Plone
    Pillow
    senaite.health


zcml =
#    plone.reload


develop =
#    src/my.package

var-dir=${buildout:directory}/var


backups-dir=${buildout:var-dir}

user=admin:6rhAfLPk4wap



deprecation-warnings = off

verbose-security = off


parts =
    instance
    repozo
    backup
    zopepy
    unifiedinstaller

[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8080



[versions]
buildout.sanitycheck = 1.0b1
Cheetah = 2.2.1
collective.recipe.backup = 2.20
Pillow = 2.6.1
plone.recipe.command = 1.1
plone.recipe.unifiedinstaller = 4.3.2
Products.DocFinderTab = 1.0.5
setuptools = 7.0
zc.buildout = 2.2.5
ZopeSkel = 2.21.2
zopeskel.dexterity = 1.5.4.1
zopeskel.diazotheme = 1.1

But with both plone versions I got this error:
RuntimeError: WeasyPrint does not support Python 2.x anymore. Please use Python 3 or install an older version of WeasyPrint.
An error occurred when trying to install WeasyPrint 43. Look above this message for any errors that were output by easy_install.
While:
Installing instance.
Getting distribution for ‘WeasyPrint’.
Error: Couldn’t install: WeasyPrint 43

I already tried installing WeasyPrint apart, but it does not work when I run:
bin/plonectl fg

Hope somebody can help me, Thanks!

Pin Weasyprint in your config to a version that supports Python 2. Worked for me

2 Likes

Yes, pin to version 0.42.3 of Weasyprint. In buildut, [versions] section, add WeasyPrint = 0.42.3 and run bin/buildout again.

[versions]
WeasyPrint = 0.42.3

Thank you for this, but WeasyPrint = 0.41 is what worked for me. Hope it helps someone.