> I am trying some of pymol scripts from Prof. Robert L. Campbell, which
require cctbx module. but I don't know how to put pymol and cctbx
togther.
> I download window version of cctbx/python2.4 bundle. and I download
pymol-0_98rc5-bin-win32-py24.zip. Installation of cctbx is fine, but I
got
> an error message that pymol can't locate python when I tried to install
pymol into site-packages directory. I don't know how to solve this
problem
> since I am new to python scripting. Could anyone give me a hand? Thanks!

There could be a couple of things.
The first thing to check is that the python path (called PYTHONHOME on
unix; not sure about windows) is set up correctly (the executable path may
need adjusting as well, maybe try running with the full path).  A
workaround for python path that should work on windows is to add few lines
to the beginning of a python script: import sys (may not be needed if sys
module has already been imported), followed by sys.path.append("full path
to the python/cctbx/pymol modules you want to install).
For python on windows, any compiled modules (which includes parts of cctbx
and pymol) have to be compiled with the same compiler (VisualC++,gcc,
etc), and possible same version, as the python interpreter was complied
with.  I'm not sure how you'd go about resolving this, other than hoping
the compiler versions happened to match, or trying to compile both with
the same compiler.
The third possible problem could be that both cctbx and pymol can come
packaged with their own python interpreters (I'm not sure how the windows
executable versions are packaged), so you'll need to make sure that both
are using the same interpreter.

For unix/linux(/os x?), this the fix would be to install everything from
source, and use environmental variables to make sure that pymol knows
about the cctbx packages, and cctbx knows which python to install itself
to.  For windows it's likely to be more difficult, if it was me I'd
install cygwin (unix emulator for windows), and just install everything
there.

Hope some of this is helpful,

Pete

Pete Meyer
Fu Lab
BMCB grad student
Cornell University





Reply via email to