Are there other people out there who compile their own PyMol on the Mac and who have succeeded with MacOS 10.4 (Tiger)?

After updating my Mac to Tiger, my PyMol installation doesn't work anymore:

~> pymol
Traceback (most recent call last):
  File "/usr/local/lib/pymol/modules/pymol/__init__.py", line 90, in ?
    import pymol
  File "/usr/local/lib/pymol/modules/pymol/__init__.py", line 306, in ?
    import _cmd
ImportError: Failure linking new module: /usr/local/lib/pymol/modules/ pymol/_cmd.so: Symbol not found: _gluCylinder
  Referenced from: /sw/lib/libglut.3.dylib
  Expected in: /usr/X11R6/lib/libGL.1.dylib


I guess that something has changed in Apple's OpenGL libraries. My first reaction was to reinstall PyMol from sources in the same way as before (i.e. using the Distutils installation method and Fink's installation of Python 2.3). This fails pretty quickly due to some problem with the GLUT headers:

In file included from layer0/os_gl.h:95,
                 from layer2/RepNonbondedSphere.c:19:
/sw/include/GL/glut.h:432: error: parse error before "layer"
/sw/include/GL/glut.h:432: warning: function declaration isn't a prototype
/sw/include/GL/glut.h:490: error: parse error before "GLfloat"
/sw/include/GL/glut.h:490: warning: function declaration isn't a prototype
...

This is perhaps not so surprising, because I didn't update Fink after updating to 10.4 - because that didn't work either. In fact, I am sufficiently fed up with the fragility of Fink that I would like to get rid of it entirely.

So I thought I should try to use MacPython 2.4.1 (my everyday Python on the Mac) and Apple's OpenGL and GLUT frameworks. That required a few patches to the PyMol sources (the includes need to be changed from GL/... to OpenGL/...) and a bit of tweaking setup.py plus some manual intervention (Distutils doesn't handle -framework parameters), but I got an error-free compile pretty quickly. I can then even start PyMol, but it messes up my screen to the point that I need to go to sleep mode and then restart to get the Finder redrawn. And I am not even sure that my approach is reasonable, given that with MacPython I also use Aqua-Tk, and thus no X11 at all. Window handling ought to be different then.

Does anyone have more ideas for getting this to work? I don't care which Python and which Tk I use, as long as I can add my own Python modules and get PyMol with NumPy support.

Konrad.


Reply via email to