* Sabuj Pattanayek <sabuj.pattanayek@...> [2005-08-22 18:03] wrote:
> Thank you for replying.
> In fact this is what I did. Gentoo automatically compiles pymol (pymol
> ebuild) with all required dependencies against the system-wide
> python-2.4.1. I then manually installed cctbx, did "source
> /usr/lib64/python-2.4/site-packages/setpaths_all.csh" and "source
> /usr/lib64/python-2.4/site-packages/setpaths.csh", ran pymol, opened up
> a pdb with CRYST header and tried to run the draw_cell.py script and I
> got this error:
> PyMOL>run draw_cell.py
> Traceback (most recent call last):
> File "/usr/lib64/python2.4/site-packages/pymol/parser.py", line 270,
> in parse
> File "draw_cell.py", line 3, in ?
> from cctbx import uctbx, sgtbx
> ImportError: No module named cctbx
I just tested it and of course it failed for me, too! It must be that
there was a slight change in the cctbx since my previous compilation
of it. Or else I had modified something to take it into account and have
When you run the setpaths.sh script, it adds the cctbx_build/bin
directory to the *front* of your $PATH. In that directory is a shell
script called "python" that sets the environment necessary to import
cctbx. So, to get cctbx to work, you have to call python without
prefixing a directory path. If you were like me and had:
/usr/bin/python $PYMOL_PATH/modules/launch_pymol.py $*
in your pymol.com file, then it would not run that
cctbx_build/bin/python script. So you need to either change the above
python $PYMOL_PATH/modules/launch_pymol.py $*
(assuming you've already run the setpaths.sh script) or you need to
copy the cctbx_build/bin/python contents (without the actual "python"
command) into your pymol.com file or some other file that you source
Within pymol, type the command:
and you should now see the cctbx directories show up.
I hope this is clear enough!
Robert L. Campbell, Ph.D. <rlc1@...>
Senior Research Associate phone: 613-533-6821
Dept. of Biochemistry, Queen's University, fax: 613-533-2497
Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc
PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2