[Chimera-users] How to install chimera as a python module

Greg Couch gregc at cgl.ucsf.edu
Mon Jul 7 14:41:58 PDT 2014

Even though the technique for using Chimera as Python module was 
mentioned on the mailing list many years ago,  it does not work in 
general because some of Chimera's functionality only works if Chimera 
has a graphics window (or is the experimental headless version), and 
other Chimera code inopportunely depends on the GUI.  So instead:

The best method is to use Chimera as the Python interpreter.  If you 
have the other Python packages already installed on your system, then 
set the CHIMERA_PATH environment variable to the directory with the 
packages in it (Chimera uses CHIMERA_PATH instead of PYTHON_PATH) and 
open the Python script in Chimera or run the Python script with 
Chimera's --script option, see 
http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html#q3. If 
you need to install a Python package into Chimera's Python interpreter, 
see http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html#q3b 
for how to use setup.py, easy_install, or pip.  Note that binary 
packages should be compiled with the same version of Python that Chimera 
uses and the same compiler that Chimera used.  For the Chimera 1.9 release,
that is Python 2.7.6 and compilers are:

         Microsoft Windows: Microsoft Visual Studio 2008  on Windows 7
         Mac OS X: Xcode 3.2.6 with the 10.6 SDK on Mac OS X 10.6.8
         Linux: GCC 4.6.2 on Debian 4.0



On 07/03/2014 04:03 PM, Ivan Castro wrote:
> Hi everyone,
> Looks like Chimera can be installed as a python module, but I can't 
> find the first steps to do that. Anyone can suggest me a tutorial or 
> webpage for this purpose.
> Thanks.
> -- 
> Iván Castro, B. Sc (Hons).
> M. Sc Student - Biology at Universidad del Valle, Colombia.
> Member of Grupo de Estudios en Genética, Ecología Molecular y 
> Fisiología Animal.
> Member of Fundación Colombiana para la Investigación y Conservación de 
> Tiburones y Rayas.

More information about the Chimera-users mailing list