Is there a way to force the use of a specific version of python for py2app? python_select appears to be getting overridden somewhere/how.

I've upgraded to python26 and noticed that my system Python (2.5) is still being used in the py2app build process. I'm also getting python 2.5.1 when I open an interpreter in the same shell that I've just issued the python_select command in.

I've confirmed that python26 is active (via `port installed`). I've selected python26. And I've confirmed that python26 is selected. py2app continues to use /System/Library/Frameworks/Python.framework/ Versions/2.5 ...

Does python_select require a specific shell? I'm using tcsh on OSX 10.5.5.

Here are the steps I've taken:

% sudo python_select python26
% sudo python_select -a
python26
% rm -rf build dist
% python setup.py py2app
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ python/modulegraph/modulegraph.py(444)load_tail()
-> raise ImportError, "No module named " + mname


My setup.py script is pretty simple:

from setuptools import setup

APP = ['Y-Film.py']
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4._qt']}

setup(
    app=APP,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

The mname error seems to be from the PyQt4._qt include. My environment can't seem to find the macports installed libs. I've added the macports paths to bin and sbin to my $PATH. Grepping and calling port without a path demonstrates that $PATH is set correctly.

Suggestions?


Thanks in advance!
Scott




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@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to