On 11/10/05, Martin Skøtt <[EMAIL PROTECTED]> wrote:
>
> On Thu, Nov 10, 2005 at 10:02:26AM -0500, Kevin Dangoor wrote:
> > Does pkg_resources.py exist in /usr/local/lib/python2.4/site-packages?
> > (I'm assuming not). What does appear in that directory?
>
> No, it's in
> /usr/local/lib/python2.4/site-packages/setuptools-0.6a7-py2.4.egg/

OK. Now we're getting somewhere, I think... see below.

> Here is what I have in /usr/local/lib/python2.4/site-packages after a
> fresh install:
>
> [EMAIL PROTECTED]:/usr/local/lib/python2.4/site-packages$ ls -l
> total 280
> -rw-r--r--  1 martin martin 198794 2005-11-10 16:20 
> cElementTree-1.0.2_20050302-py2.4-linux-i686.egg
[snippage of eggs]

> I was wondering why the isn't a single .py file in the top.

This is how eggs work. The idea is that you can actually have multiple
versions of Python packages installed and things of that nature.

What's interesting is that your site-packages does not have any .pth
files in it. My guess is that your system site-packages does not have
any useful .pth files either. This is why pkg_resources can't be
found.

Take a look at the site-dirs command line option discussion on this page:
http://peak.telecommunity.com/DevCenter/EasyInstall

To be able to find pkg_resources, either the setuptools egg directory
needs to be on your PYTHONPATH (ugly, would have to change every
update of setuptools), or you need setuptools.pth to appear in a
Python sitedir. Python only searches specific site directories for
.pth files that it uses to expand the path. The page above tells you
how you can put a single pth file in your system site-packages
directory and allow /usr/local/lib/python2.4/site-packages to act as a
sitedir.

Kevin

Reply via email to