How to install local module other than in "site-packages"?

Ben Finney ben+python at
Mon Jan 18 01:35:48 CET 2010

Jive Dadson <notontheweb at> writes:

>    How do I install a module that I wrote, without putting it in the
> site-packages directory for a specific release?  I have stuff that, to
> the best of my knowledge and belief, ought to work under any release.

Nevertheless, the compiled byte-code version will be specific to the
Python version that compiled it. You need to install the module to a
version-specific directory for that reason at least.

> I do not want to have multiple copies of it.  When I edit one of the
> modules, I want it to "take" for every release.  Is that clear?  Hope
> so.

You'll need (I'd love to be corrected on this) to come up with a
deployment discipline: a build process that deploys the module from its
(single, canonical) source location to the appropriate locations when
you decide to deploy it.

 \          “It is well to remember that the entire universe, with one |
  `\   trifling exception, is composed of others.” —John Andrew Holmes |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list