<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Paul,<div class=""><br class=""></div><div class=""> 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</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/colorbrewer.py</div><div class=""><br class=""></div><div class="">But I’m guessing you have the following colorbrewer module which is completely different from the Chimera one installed with your system Python</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://pypi.python.org/pypi/colorbrewer/" class="">https://pypi.python.org/pypi/colorbrewer/</a></div><div class=""><br class=""></div><div class="">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</div><div class=""><br class=""></div><div class="">import sys</div><div class="">sys.path.insert(0, '/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages’)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 16, 2016, at 4:08 AM, Paul Kibet Korir wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="content-type" content="text/html; charset=utf-8" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
Hi,<br class="">
<br class="">
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. <br class="">
<br class="">
>>> import chimera<br class="">
Traceback (most recent call last):<br class="">
File "<stdin>", line 1, in <module><br class="">
File
"/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py",
line 73, in <module><br class="">
import palettes<br class="">
File
"/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py",
line 103, in <module><br class="">
_initPresets()<br class="">
File
"/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py",
line 95, in _initPresets<br class="">
from colorbrewer import ColorBrewer<br class="">
ImportError: cannot import name ColorBrewer<br class="">
<br class="">
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).<br class="">
<br class="">
<div class="moz-signature">-- <br class="">
With kind regards,<br class="">
<br class="">
<strong class="">Paul K Korir, PhD</strong><br class="">
<i class="">Scientific Programmer</i><br class="">
EMBL-EBI<br class="">
Main Building, A2-35,<br class="">
WTGC, Hinxton, Cambridge CB10 1SD<br class="">
P: +44 1223 49 44 22<br class="">
F: +44 1223 49 44 68</div>
</div>
_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>