[Pythonmac-SIG] Interpreter not initialized

Dane Springmeyer blake at hailmail.net
Fri Jun 5 08:37:16 CEST 2009


Hey Scott,

Essentially the problem results (like you note) from the system python  
(or some other python version) linking to a macports library. That  
python version then differs from the python version your are running  
from the interpreter.

In general I've noticed this has been a big problem for macports and  
python25. Upgrading to python26 from macports often can help.

Beyond that trying to figure out exactly what is linking to what is  
the next step, and the 'otool' command comes in very handy for this.

For example, try pointing 'otool' at your pyqt lib like:

$ otool -L /opt/local/lib/<name of pyqtlib>

The resulting list will likely should linking to the /system python.  
If you can't upgrade to py26-pyqt then consider filing a bug with  
macports.

The last  trick is to use the 'install_name_tool' to actually manually  
(brute force) fix the linking from the /system python to the macports  
python.

Dane


On Jun 4, 2009, at 11:04 PM, Scott Frankel wrote:

>
> I'm using py2app for the first time to build a PyQt app.  I get the  
> following error msg when I launch the app:
>
> 	Fatal Python error: Interpreter not initialized (version mismatch?)
>
> I've downloaded macports and installed its python25, pyqt, &c.  I've  
> issued the command, sudo python_select python25, and checked that  
> python25 is selected with python_select -s.
>
> From searching the net and the archives, it's likely that the system  
> python is seeping into the build process somewhere.  The info I've  
> read says that python_select should take care of the problem.
>
> Any other suggestions?
> Thanks in advance!
> Scott
>
>
> OSX 10.5.5
> py25-py2app-devel @0.4.2_1
> MacPorts-1.7.1-10.5-Leopard
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig



More information about the Pythonmac-SIG mailing list