Python Packages via Easy Install for a Unified-Installer-built Plone

18 12 2007

Because Plone/Zope requires an older version of Python than comes out of the box with many OS’s, some people recommend installing Plone with the Unified Installer. On Unix-like systems, the Unified Installer builds Python, Zope, Plone, and some dependencies from source and keeps the whole shebang relatively segregated from the rest of the OS.

This is great until you need to install an additional Python package for a Plone product. For which of your multiple Python versions will your installer build the package? This question would be frustrating enough even if there weren’t at least five different installers for Python packages.

The installer I use, and the one I’ll write about here, is Easy Install, which comes with setuptools. Having much experience with Perl, I chose Easy Install because it’s supposedly “the closest thing to CPAN currently available for Python.” One problem with Easy Install is that it tends to install packages in the system Python site-packages directory. Here’s how to easy_install packages for the Python built by the Unified Installer:

  1. cd $ZOPE/bin
  2. wget
  3. ./python
  4. ./python -m easy_install $package_name

Voila! See the Easy Install docs for details about why this works.

You may also want to set up some aliases for your various Pythons.