I'll second what Nat wrote. One of the reasons PyMOL is open-source is so that outside developers can compile and use PyMOL with their own external Python interpreters without regard to what Python version, operating system, or hardware platform they are using.
Practically speaking, it would be impossible for DeLano Scientific to support such degeneracy with precompiled binaries -- there are simply too many versions of Python, too many word sizes & byte orders, and too many binary-incompatible operating systems. Accordingly, our precompiled binaries embed Python and are primarily intended to serve ordinary end-users and Python-only developers who do not need to integrate with native external code libraries other than those which ship with PyMOL. PyMOL is a Python interpreter, and you can run Python scripts (with our without use of the PyMOL API) from directly within it (via run) or on the command line:
pymol -qr script.py -- ...arguments...
# is roughly equivalent to:
pymol script.py ...arguments...
That is the situation today, though we may release a PyMOL SDK in the future to address specific unmet needs on proprietary operating systems. But right now, if you're doing PyMOL-based development with native external code libraries, then (A) you should be compiling PyMOL yourself via distutils, and (B) you should be using an open-source platform, preferably Linux or FreeBSD.
Of course, to the the extent that they can effectively emulate a Linux-like open-source environment, X11/Fink under Mac OS X and X11/Cygwin under Windows may also be able to compile the PyMOL open-source code, as Nat just confirmed, but with no guarantees:
Although the PyMOL license is permissive, we, as a company, only target and support Linux with our Open-Source code.
From: Nathaniel Echols [mailto:nathaniel.echols@...]
Sent: Friday, May 01, 2009 9:25 AM
Subject: Re: [PyMOL] Newbie attempting to python script: ImportError: Nomodule named _cmd
On Fri, May 1, 2009 at 3:57 AM, Luke Goodsell <luke.goodsell@...> wrote:
I'm trying to set up my machine to be able to run python scripts using
the PyMol API, but whenever I try to import the pymol module, I get the
. . .
I am running Mac OS X 10.5.6. I downloaded MacPyMol 1.1r1 from
http://delsci.com/macpymol/ (the educational edition, as I am a student).
My PYMOL_PATH: /Applications/PyMOLX11Hybrid.app/pymol
My PYMOL_EXE: /Applications/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL
. . .
I copied the contents of /Applications/PyMOLX11Hybrid.app/pymol/modules
as per my understanding of the top of __init__.py
It's not entirely clear to me what you're trying to do, but I'm pretty certain it's guaranteed not to work. You can't just take compiled objects from inside app bundles and move them around - especially on Mac. You definitely shouldn't be installing PyMOL modules that way. If you need them available for importing by /usr/bin/python, download the open-source version from SourceForge and install it using python distutils (i.e. "python setup.py build" and so on). I just tried this and it seems to work fine - only takes about 10 minutes.