Hi citizens:
OS X comes with a version of python that doesn't play well with x-
windows-based modules, so when compiling and running coot, I would
like to make sure that I use a different version of python that has
things like the gtk2 modules in its sys.path. However, despite having
the other python (/sw/bin/python) at the head of my $PATH, the system
python seems to be embedded in coot's interpreter, at least from what
I can see:
This is what I want:
zsh-% which python
/sw/bin/python
zsh-% python
Python 2.6 (r26:66714, Nov 2 2008, 12:54:49)
[GCC 4.0.1 (Apple Inc. build 5484)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/sw/lib/python26.zip', '/sw/lib/python2.6', '/sw/lib/python2.6/
plat-darwin', '/sw/lib/python2.6/plat-mac', '/sw/lib/python2.6/plat-
mac/lib-scriptpackages', '/sw/lib/python2.6/lib-tk', '/sw/lib/
python2.6/lib-old', '/sw/lib/python2.6/lib-dynload', '/sw/lib/
python2.6/site-packages', '/sw/lib/python2.6/site-packages/Numeric', '/
sw/lib/python2.6/site-packages/gtk-2.0']
>>>
But with coot, I think it is using /usr/bin/python, because I get this:
COOT_PYTHON_DIR was defined to be /sw/share/coot/python
but no PyGtk and hence no coot_gui.
Entry contents: print sys.path
Running string: print sys.path
['/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python25.zip', '/System/Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/
Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/
Library/Python/2.5/site-packages', '/System/Library/Frameworks/
Python.framework/Versions/2.5/Extras/lib/python/PyObjC', '/sw/share/
coot/python', '/sw/share/coot/python', '/sw/share/coot/python', '/sw/
share/coot/python']
which is the same sys.path I get for /usr/bin/python, apart from the
last four redundant entries.
How do I deal with this?
Bill