Hi All,

I am using MacPyMOL 0.99rc6 on Mac OS X leopard (10.5.1). I wanted to
import the pymol modules into python. As suggested by
MacPyMOL.app/pymol/modules/pymol/__init__.py I set the following
environment variables:

export 
PYMOL_PATH=$PYMOL_PATH:/Volumes/Home/shatadal/Programs/MacPyMOL.app/pymol:
export PYTHONPATH=$PYTHONPATH:$PYMOL_PATH/modules:

Then when I try to import pymol within python (e.g. as shown in
http://www.rubor.de/bioinf/tips_python.html#pythonscr) I get the
following error:

$ python
Python 2.5.1 (r251:54863, Oct  5 2007, 21:08:09)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymol
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/Volumes/Home/shatadal/Programs/MacPyMOL.app/pymol/modules/pymol/__init__.py",
line 353, in <module>
    import _cmd
ImportError: No module named _cmd
>>>

When I try to run __init__.py from the bash commandline I get the same error:

$ python __init__.py
Traceback (most recent call last):
  File "__init__.py", line 109, in <module>
    import pymol
  File 
"/Volumes/Home/shatadal/Programs/MacPyMOL.app/pymol/modules/pymol/__init__.py",
line 353, in <module>
    import _cmd
ImportError: No module named _cmd

Can anyone help me in getting to import the pymol module in python?

Thanks,
Shatadal.

Reply via email to