I still think coot is somehow using /usr/bin/python, despite the fact
that configure fails unless I specify -I/sw/include/python2.5, or at
least it is using the OS X system's python filesystem to create its
own sys.path
If I explicitly export into PYTHONPATH everything that gets coded in
sys.path from /sw/bin/python, coot will seg-fault, but if I add in
additional paths corresponding to what gets coded into sys.path for
BOTH pythons, then coot works.
I can also then import pygtk from the scripting gui.
However, when coot starts up it claims it cannot find PyGtk.
On Jan 30, 2009, at 10:50 AM, Nathaniel Echols wrote:
This has been a problem on and off with recent OS X binary builds
too. The
interpreter is actually supposed to be coot itself - I don't think
/sw/bin/python is going to do you any good, since it doesn't have
access to
the memory of the running coot process. I don't know what the
source of the
variability is, unfortunately, but the binaries I was using of
coot-0.5-pre1
had this problem, while coot-0.5.1-pre1-1661 used the correct
interpreter.
I assume it's something in the makefiles, or some difference in
configure
options. . . but I don't have these.
On Fri, Jan 30, 2009 at 10:35 AM, William G. Scott <
[email protected]> wrote:
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