[chimera-dev] Running Chimera through Python script
Eric Pettersen
pett at cgl.ucsf.edu
Tue Jan 23 15:03:35 PST 2018
Hi Evan,
That code only works in the context of Chimera’s Python interpreter, not a generic Python interpreter. So like it says in the example, “to execute the script, either open the script file with the File→Open menu item or with the open command”.
Third parties have developed modules to allow Chimera modules to be used in standard Python interpreters. One such package is pychimera, <https://pypi.python.org/pypi/pychimera/0.2.0> which can be installed via pypi.
Chimera only supports Python2. ChimeraX uses Python3.
—Eric
Eric Pettersen
UCSF Computer Graphics Lab
> On Jan 23, 2018, at 11:03 AM, Evan Seitz <evan.e.seitz at gmail.com> wrote:
>
> Hi - I’m trying to follow Example 1 on http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html>, but after entering the code precisely as it is written, am getting back the ModuleNotFoundError: No module named ‘chimera’.
>
> I’ve tried running the script using both Python2.7 and Python3, and both have resulted in the same error. As a sub-question, is Chimera supported in Python3, or is it best practice to still use Python2?
>
> Thank you,
> Evan Seitz
>
> Chimera version: 1.12.0
> OS: macOS High Sierra 10.13.2
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20180123/715c612e/attachment-0001.html>
More information about the Chimera-dev
mailing list