[Chimera-users] importing chimera module question
Greg Couch
gregc at cgl.ucsf.edu
Thu Sep 22 16:50:05 PDT 2011
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/20110922/cc54c206/attachment.html>
More information about the Chimera-users
mailing list