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, 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@gmail.com> wrote:

Hi - I’m trying to follow Example 1 on 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@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev