Problem with .pth files under linux

John Roth johnroth at ameritech.net
Wed Nov 14 14:33:40 EST 2001


"Andrew MacIntyre" <andymac at bullseye.apana.org.au> wrote in message
news:mailman.1005760821.4088.python-list at python.org...
On Tue, 13 Nov 2001, Fernando [ISO-8859-1] Pérez wrote:

> I'm sure this is simple and stupid, but I still don't know what's
going on. I
> have some modules without a package structure (no __init__.py) but
which have
> a .pth file. Specifically, Numeric. It comes in its own directory:
> site-packages/Numeric, and in site-packages I have a file Numeric.pth
whose
> contents is simply 'Numeric' (no quotes).
>
> Yet import Numeric doesn't work! I solved it by hand-coding Numeric
into
> sys.path, but it annoys me and I have the same problem with other
modules
> I'll need to use soon.

Is site-packages in sys.path? (or added to sys.path by site.py?)

I believe you have to move the .pth file into your python path. There's
doucmentation somewhere about this, but it's well hidden, and it
differs between xNIX and Windows.

John Roth






More information about the Python-list mailing list