Best practices for simultaneously installed versioned packages?

Ned Deily nad at
Mon Jan 4 21:31:10 CET 2010

In article 
<ec96e1391001040816r77970e4ekca36f43b19e40a19 at>,
 Benjamin Kaplan <benjamin.kaplan at> wrote:
> On Mon, Jan 4, 2010 at 6:09 AM, Larry Hastings <larry at> wrote:
> > I'm writing a package for Python 3--let's call it "spacegoblin".  I fear
> > someday I may need multiple versions installed and available simultaneously,
> > even within one version of Python.  So I want to plan ahead for that
> > possibility.  What would be the best way to allow this?  Right now I install
> > the package with the version in the name, like "spacegoblin_1_0" and
> > "spacegoblin_1_1".  But I have an uneasy sense that I'm doing something
> > stupid... mainly because I've never seen anyone do this before.
> >
> > A coworker said they did it like "spacegoblin.1_0" and "spacegoblin.1_1" at
> > a previous employer.  That seems like an improvement, though not the "yes
> > that's obviously right" answer I'm holding out for.  Your thoughts?> 
> wxpython installs a "wxversion" module which has functions like
> getInstalled(), ensureMinimal(version), and select(version). You can
> call before importing wx and it will make sure that
> the correct version is imported. You might want to look up what they
> did.

Also, setuptools (and, its successor, distribute, which supports Python 
3) allow the installation and management of multiple versions of a 
package within one python site-library instance.

 Ned Deily,
 nad at

More information about the Python-list mailing list