[Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH

Jack Jansen Jack.Jansen@oratrix.com
Mon, 23 Dec 2002 21:23:28 +0100


On maandag, dec 23, 2002, at 17:47 Europe/Amsterdam, Ivan Kozik wrote:

> The problem is that I have fink installed (and /sw/bin in the PATH), 
> and apparently it was using the libraries in /sw/lib/python2.2.

This can only be part of the problem. Whether you use Apple's Python 
2.2 in /usr/bin/python or Finks (which is presumably 2.2.2) in 
/sw/bin/python, each of these should be able to find its own 
..../lib/python2.2 directory. The two installations should not bite 
each other, unless either you've set some environment variables or 
someone (either Apple or the fink people) messed up.

> I renamed python2.2 in /sw/lib to python2.2-dontuse, and then it 
> started fine, even with /usr/bin in the PATH and a /usr/bin/python 
> link. (It now used the libraries in 
> /Library/Frameworks/Python.framework). I still do think that many 
> users will have fink installed and /sw/bin in their $PATH, so is there 
> any workaround for this? Does anyone know how apple compiled python? 
> (It doesn't seem to have any command line switches (just ignores 
> them), and it executes Bundle.app/Contents/Resources/__main__.py if 
> one exists.)

I think you're mixing up more things than you think. In 2.2.X, the 
*only* Python interpreter that shows this behaviour is 
"pythonforbundle", which is only built if you do a framework build 
(Apple doesn't do this, and nor does fink IIRC), and which lives in 
/Applications/Python.app/Contents/MacOS/python. Did you by any chance 
build this yourself, and somehow left a symlink "python" pointing to it 
somewhere on your $PATH?
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -