[Distutils] easy_install and sys.path

Bryan Lawrence b.n.lawrence at rl.ac.uk
Wed May 9 11:00:06 CEST 2007


On Wednesday 09 May 2007 08:52:45 Matt Good wrote:
> You seem to have missed the main point of Tres's email. 

Wouldn't be the first time I missed the point, and wont be the last :-)
Thanks to you both.

> The problem is 
> not inherent to Eggs, but you seem to have either set PYTHONPATH

No.

> or have 
> a .pth file that's being loaded which is telling your /usr Python to
> look in the /usr/local Python's site-packages folder.

The /usr python doesn't have such a .pth file*, but there is one in 
the /usr/local/lib/python2.5/site-packages, which seems to be 
inserting the eggs. 
* the only one that exists in the /usr hierarchy 
is /usr/lib/python2.5/site-packages/python-support.pth which
points to /var/lib/python-support/python2.5

> Packages 
> installed to /usr/local in the traditional way would still be on
> sys.path and would have the exact same problem.

No I don't think so, because they should be in sys.path after the packages 
in /usr/lib/, the problem is manifesting here because the eggs are inserted 
in the top of the site-path. (But as tres points out, any number of other 
dynamic load problems could manifest themselves next).

> So check your 
> PYTHONPATH and grep your .pth files in /usr/lib/python2.5/site-packages
> for any references to /usr/local and remove them.

So now I'm twice as confused.
1) I don't know why the .pth file in my /usr/local/site-packages is being 
processed by my /usr python
2) I don't know why eggs want to be first in the queue.

Cheers
Bryan


More information about the Distutils-SIG mailing list