Hi Greg,

Thanks for the kind reply. 
Sorry about the typo.

The environment variables of the system seem fine to me. I also tried calling Chimera  from the same directory as the script and its working fine. 

However, calling the chimera script using "python sample.py" doesn't work and using absolute path to chimera didn't help too.

I tried installing pychimera, but end up with the same kind of error when I try pychimera -i
import pychimera

ImportError: No module named pychimera


Couldn't understand what's going on with these import modules.


I would greatly appreciate any suggestions to solve this.


Thanks,

Subha


On Mon, Jun 20, 2016 at 4:05 PM, Greg Couch <gregc@cgl.ucsf.edu> wrote:
(I assume you meant --nostatus)

For me the simple test of a file with:
import os
os.system("chimera --nogui --nostatus")
works just fine.  So it's probably something about your particular setup that is tickling this bug.

It might be the directory that you're running the script in, it might have python modules/packages that conflict with chimera's.  Or it might something in the environment.  Chimera tries to protect its python from the user's environment, but maybe we missed something.  Also double check that the chimera you're invoking is the one you're expecting -- try using an absolute path to chimera while you're debugging this.

    HTH,

    Greg


On 06/20/2016 01:18 PM, Subha Kalyaanamoorthy wrote:
Hi There,

I am trying to call a script with Chimera commands(saved as sample.py file)  in another python program using os.system("chimera --nogui --nostats sample.py") and I get an module load error as below,

import chimera

ImportError: No module named chimera


However, if I call the script with chimera it works, for eg., chimera --nogui --nostats sample.py typed directly in terminal is working.


Can anybody help fix this error?


Thanks in advance,

Best Regards,

Subha




_______________________________________________
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu
Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users




--
Dr. Subha Kalyaanamoorthy
Post Doctoral Fellow
Faculty of Pharmacy and Pharmaceutical Sciences
University of Alberta
Edmonton, Canada.