[Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH
Ivan Kozik
ivan@allometra.com
Mon, 23 Dec 2002 19:35:57 -0800
On Monday, December 23, 2002, at 12:23 PM, Jack Jansen wrote:
>
> 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?
You were right, Mac OS X does not come with the Framework version of
Python. I installed a Pygame bundle with Python.framework earlier and
did not know exactly what it did back then. The problem was that my
/usr/bin/python link pointed to /sw/bin/python. I changed the link to
point to "python2.2" in the same directory and it works now. I think
this setup will be quite rare so I'm fine with the way it is.
Ivan
> --
> - 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 -
>