[Chimera-users] importing chimera module question

Lockwood, Svetlana svetlana.lockwood at email.wsu.edu
Thu Sep 22 17:09:51 PDT 2011


Thanks, Greg! I think I'll use the IDLE directly, it seems to be working. Thanks!



--sv



________________________________
From: chimera-users-bounces at cgl.ucsf.edu [chimera-users-bounces at cgl.ucsf.edu] on behalf of Greg Couch [gregc at cgl.ucsf.edu]
Sent: Thursday, September 22, 2011 4:50 PM
To: chimera-users at cgl.ucsf.edu
Subject: Re: [Chimera-users] importing chimera module question

On 09/22/2011 01:58 PM, Lockwood, Svetlana wrote:

Hi to everybody!



I am new to Chimera. I've just installed Chimera and trying to run a python script. I get the import error: no module named chimera. My OS is Win7 and Chimera 1.5.3. I checked my path under enviromental variables and added Chimera folder in there. Still nothing changed. There must be an easy fix to this.



Please let me know what could be done. Thanks!

The easy fix is to use Chimera's Python instead of the system version.  Chimera includes several binary packages and those are often incompatible with the system Python.

On Windows, you would either use the runscript chimera command, or the Tools / General Controls / IDLE Python shell.

On Linux (and to a lesser extent, Mac OS X), it is easy to run your script from a Terminal window, with:

    chimera --nogui --silent script.py

*if* your script doesn't take any arguments.  Or if it does:

    chimera --nogui --silent --script "script.py arguments"

It is possible to do the above on Windows with its Command Prompt program, but I use the http://cygwin.com Linux emulation environment because it works better.

See the Chimera documentation for details about the --script startup option and the runscript chimera command, and question #3 in the Chimera Programming FAQ.

    HTH,

    Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20110923/042c8d8b/attachment.html>


More information about the Chimera-users mailing list