Newbie Question: How to use a .pth file on a Macintosh

J Peyret jpeyret at gmail.com
Sat May 24 19:57:43 EDT 2008


Hmmm, for lack of a better response, here are some suggestions, based
on what I've seen on Windows+Linux.

#1 put the .pth in the site-packages directory (this is what I do on
Linux).  I think Python considers it special and looks for pth.

you can probably get that directory from doing

import sys
for i in sys.path:
    print i

#2 put the .pth in the directory where the python executable is
located (this is less messy on Windows than on Linux or OS X)

which python (run on the OS X terminal command shell) should give you
an idea of where that is.

#3 Another idea is to use the Finder to find _other_ *.pth files that
may exist and put yours in the same location.

Best of luck.



More information about the Python-list mailing list