How to install newer Python with the Apple installed Python.
Panther comes with Python 2.3.0, installed using Framework install, at /System/Library/Frameworks/Python.framework/Versions/2.3. If you want to install a newer version, you might get the Fatal Python error: Interpreter not initialized (version mismatch?) error.
You can avoid this problem by installing Python like this:
- Configure, make and make install - using standard unix install:
./configure make sudo make installPython will be installed to '/usr/local'
- Create a link to python with a unique name:
cd /usr/local/bin ln python python2.3.4
- In your scripts, use:
This problem is caused by this bug 932977. Because of bug in darwin, Python does not get /usr/local/bin/python as first argument, but only python. So it tries to look for python in the system path, and of course finds /usr/bin/python.
The results is that you run Python 2.3.4, and it loads modules from Python 2.3.0. When you try to load extenstion modules, like cStringIO, you get this Interpreter not initialized error.
This problem is fixed in Python 2.4a3, see http://www.opendarwin.org/pipermail/cvs-darwinports-all/2004-February/023306.html .