Jonathan Gardner jgardner at
Thu Mar 4 01:10:14 CET 2010

On Wed, Mar 3, 2010 at 2:14 AM, geoffbache <geoff.bache at> wrote:
> I have a very simple problem that seems to have no simple solution.
> I have a module which is installed centrally and lives in a Python
> egg. I have experimented with some minor changes to it and would like
> to set my PYTHONPATH to pick up my local copy of it, but don't want to
> have to figure out how to build my own version of the "egg" if
> possible.
> Unfortunately, the location from PYTHONPATH ends up after the eggs in
> sys.path so I can't persuade Python to import my version. The only way
> I've found to fix it is to copy the main script and manually hack
> sys.path at the start of it which isn't really very nice. I wonder if
> there is any better way as I can't be the first person to want to do
> this, surely?
> I've seen this issue has been discussed elsewhere and flagged as a
> problem (e.g.
> but I've been unable to find any suggestions for workarounds or
> indications whether this will be/has been fixed.

Sounds like you might need to use virtualenv to setup python
environments that you can control.

Jonathan Gardner
jgardner at

More information about the Python-list mailing list