Tip for macOS pyenv+buildout users

A tip for those using a Plone installed via buildout on macOS, when using a pyenv-installed Python:

  • Remember when you upgrade your macOS, you will need to rebuild your pyenv python via pyenv install $VERSION_GOES_HERE β€” or you will make pkg_resources and by proxy zc.buildout.easy_install unhappy with you.

If you do not do this, you may get distribution installation errors related to copying your wheels to the eggs/ directory, because buildout relies on pkg_resources.compatible_platforms() result, which will very much not be the same for your Python built on previous macOS version.

Errors in this case will look like, when running buildout:

The first time you run buildout after your macOS upgrade:

OSError: [Errno 66] Directory not empty: ...

If you try again, you get a slightly different error:

    assert newdist is not None  # newloc above is missing our dist?!
AssertionError

What is seen in pdb for this case β€” say you built Python on Ventura, and upgraded to Sonoma β€” is that what is compared in pkg_resources.compatible_platforms() is not equal:

{'provided': 'macosx-13.6-arm64', 'required': 'macosx-14.3-arm64'}
4 Likes

live saver :heart_eyes:

2 Likes