[Chimera-users] Installing colorbrewer for Chimera Python

Paul Kibet Korir pkorir at ebi.ac.uk
Wed Feb 17 01:28:01 PST 2016


Thank you very much, Tom.

I found the folder and added a file 'chimera.pth' to system Python 
site-packages with the path to Chimera's site-packages, which also did 
the same thing.

The whole point for me doing this was to try and take advantage of 
Chimera's functionality. I would like to slice closed 3D volumes. I've 
looked through the online documentation but have not had success. Could 
you please point me in the right direction on how to achieve this?

My input will be *vertices and polygons* together with a slicing plane 
and my expected output is the *contents of the plane as an 'image'**or 
set or polygons*.

Many thanks.

Paul




On 16/02/2016 23:52, Tom Goddard wrote:
> 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
>
> /Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/colorbrewer.py
>
> But I’m guessing you have the following colorbrewer module which is 
> completely different from the Chimera one installed with your system 
> Python
>
> https://pypi.python.org/pypi/colorbrewer/
>
> 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’)
>
>
>   Tom
>
>> 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/
>> EMBL-EBI
>> 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 
>> <mailto:Chimera-users at cgl.ucsf.edu>
>> Manage subscription: 
>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>

-- 
With kind regards,

*Paul K Korir, PhD*
/Scientific Programmer/
EMBL-EBI
Main Building, A2-35,
WTGC, Hinxton, Cambridge CB10 1SD
P: +44 1223 49 44 22
F: +44 1223 49 44 68
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160217/10fd6956/attachment-0001.html>


More information about the Chimera-users mailing list