[Pythonmac-SIG] Can't get re-installed python to recognize old paths.

Robert Kern rkern at ucsd.edu
Fri Jul 22 20:03:06 CEST 2005


Louis Pecora wrote:
> After a lot of hair pulling (long story) I re-installed OS X 10.3 
> (archive and install) and then upgraded to 10.3.9.  Python seems to work 
> and other problems seem to be gone, but when I try to import my original 
> modules it can't find them.  I looked in the folder .MacOSX and see that 
> Enviroment.plist is still there and it has the original paths that once 
> worked (two weeks ago).  Here it is:

Can't say much about setting PYTHONPATH, but an option you should 
consider is to make a .pth file in your site-packages directory that 
lists all of these directories, one per line.

For example:

# mystuff.pth
/users/louispecora/Code/python/general
/users/louispecora/Code/python/stats
/users/louispecora/Code/python/stats/BayesProb
/users/louispecora/Code/python/time_series
/users/louispecora/Code/python/plotwindow
/users/louispecora/Code/AddedPackagesfiles

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


More information about the Pythonmac-SIG mailing list