[Pythonmac-SIG] Upgraded to 2.4 and can't make it work

Kent Quirk kquirk at solidworks.com
Thu May 26 05:18:07 CEST 2005


Just because this is really trouble for me, and I'm hoping to get some ideas, I'm going to update with some of the other things we've tried today:

a) I updated py2app from svn and rebuilt it on this machine using
	python2.4 setup.py bdist-mpkg --open
Just to make sure it was compatible with the python2.4 I have here.

b) We replaced our app's primary .py file with one that does nothing but import our first extension. It broke (thereby confirming that we're not setting up things funny in our .py file).

c) I added some import statements for standard python modules:

import os
import sys
import time
print "hello"
import util                  # one of our extensions

It got through the first 4 lines and crashed on the last one.


d) We dumped sys.environ and sys.executable, then constructed a command line that used those variables to explicitly load our extension. It worked. 

e) I build using --semi-standalone and the application worked (except that it doesn't include the python framework, which is the point of this exercise). So it appears to be something wrong with the python framework being built into my app.

f) I looked into the app/Contents/Frameworks/Python.framework and it contains nothing that looks like python library code. But I'm guessing that's because it's all been stuffed into the site-packages.zip in Resources. Or something. 

Help? Please?

	Kent


________________________________________
From: pythonmac-sig-bounces at python.org [mailto:pythonmac-sig-bounces at python.org] On Behalf Of Kent Quirk
Sent: Wednesday, May 25, 2005 12:20 PM
To: pythonmac-sig at python.org
Subject: [Pythonmac-SIG] Upgraded to 2.4 and can't make it work

We've been building our product using py2app 0.2 on Panther with Apple's Mac python. That has worked for some time, but as has been pointed out here many times, relying on that is not the safest way to ship things to real customers. 

The app is large with several C++ extensions using boost::python. We need to support customers running Panther as well as Tiger, so we're continuing to build under Panther. 

So we've upgraded Panther to MacPython 2.4, and grabbed the appropriate py2app (py2app-0.2-py2.4-macosx10.3). The application builds, but when we run it, it dies with "Interpreter not initialized (version mismatch?)".  This happens the instant we attempt to import our first extension.

We can load our extensions manually by specifying the appropriate DYLD environment variables and they load properly. The DYLD parameters are specified in the setup.py (and it all seems to work with the Apple native python). 

We have carefully checked all our dependencies in the xcode build - we're building everything with the 2.4 python. The .plist file in the constructed application indicates that we successfully found and built with the 2.4 python.

We've tried changing the symlink at /usr/bin/python to point to 2.4 instead of 2.3, but that didn't fix the problem, so we put it back the way it was.

We tried installing PantherPythonFix (out of desperation) but we didn't expect it to change anything and it didn't.

We build using 
       python2.4 setup.py py2app
       
It looks like the executable built into our app (in the Contents/MacOS folder) is still somehow dependent on the native python, but we can't figure out what the problem is.

Help, please? Any ideas?

             Kent


More information about the Pythonmac-SIG mailing list