[Chimera-users] Installing colorbrewer for Chimera Python

Tom Goddard goddard at sonic.net
Tue Feb 16 15:52:21 PST 2016

Hi Paul,

  The error means that you have two different colorbrewer Python modules and Chimera is getting the one that didn’t come with Chimera.  I see the Chimera colorbrewer.py file in


But I’m guessing you have the following colorbrewer module which is completely different from the Chimera one installed with your system Python


In order for Chimera modules to work from the system Python it will be necessary that Chimera finds its own Python modules.  So you should put the above Chimera site-packages directory in front of Python system locations in the Python search path sys.path.  I would put this in your script that starts Chimera using the system Python, something like

import sys
sys.path.insert(0, '/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages’)


> On Feb 16, 2016, at 4:08 AM, Paul Kibet Korir  wrote:
> Hi,
> I want to use the chimera API and I've managed to configure a successful import of chimera except that I get that colorbrewer is not installed. 
> >>> import chimera
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py", line 73, in <module>
>     import palettes
>   File "/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py", line 103, in <module>
>     _initPresets()
>   File "/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py", line 95, in _initPresets
>     from colorbrewer import ColorBrewer
> ImportError: cannot import name ColorBrewer
> What is the right way to go about this? (I could create a symbolic link to my system colorbrewer, but that doesn't seem clean).
> -- 
> With kind regards,
> Paul K Korir, PhD
> Scientific Programmer
> Main Building, A2-35,
> WTGC, Hinxton, Cambridge CB10 1SD
> P: +44 1223 49 44 22
> F: +44 1223 49 44 68
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160216/2b22125a/attachment.html>

More information about the Chimera-users mailing list