Combining conda and virtualenv for a viable Python 2.7 buildout environment on Mac

On a Mac I've found the following strategy helpful:

Use conda to create a python2 environment. Then install and use virtualenv in that environment:

conda create --name plonepy2 python=2.7

Do the rest of the commands in the root of your buildout

conda activate plonepy2
conda install virtualenv
virtualenv venv
source venv/bin/activate

I've only tested this on Catalina, not on Big Sur and NOT on an M1 Mac.

I found that a conda environment alone was not enough as I kept getting a couldn't find index page for 'zc.buildout' error
when running python

Something like this:

Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Traceback (most recent call last):
  File "", line 199, in <module>
  File "build/bdist.macosx-10.7-x86_64/egg/pkg_resources/", line 963, in require
  File "build/bdist.macosx-10.7-x86_64/egg/pkg_resources/", line 849, in resolve

Once I introduced virtualenv.... problem solved.... python

And yes.... you're welcome future self :slight_smile:

1 Like

One thing I like about @pigeonflight is that he addresses issues that I have but haven't asked about yet. Awesome. :grinning:

1 Like