Multiple versions of Python on OS X Leopard

前端 未结 4 1902
醉话见心
醉话见心 2020-11-30 05:21

I currently have multiple versions of Python installed on my Mac, the one that came with it, a version I downloaded recently from python.org, an older version used to run Zo

4条回答
  •  心在旅途
    2020-11-30 05:24

    Ian Bicking's virtualenv allows me to have isolated Pythons for each application I build, and lets me decide whether or not to include the global site-packages in the isolated Python environment.

    I haven't tried it with Zope, but I'm guessing that the following should work nicely:

    1. Using your Zope's Python, make a new virtualenv, either with or without --no-site-packages
    2. Drop your Zope into the virtualenv
    3. Activate the environment with $VENV/bin/activate
    4. Install any needed site-packages
    5. Run your Zope using the Python now at $VENV/bin/python

    This has worked brilliantly for managing Django projects with various versions of Python, Django, and add-ons.

    This article seems to go into more detail on the specifics of Grok and Virtualenv, but the generalities should apply to Zope as welll.

提交回复
热议问题