Cant seem to import a palette

Following the 2.0 documentation. I’m on a mac, python v 3.7.3

This line :
from bokeh.palettes import Spectra16
Throws :
ImportError: cannot import name ‘Spectra16’ from ‘bokeh.palettes’ (unknown location)

How can i go about debugging what i’m doing wrong here?

Hi @specialjyo, it is Spectral (with an “l”)

Thanks, but

ImportError: cannot import name ‘Spectral16’ from ‘bokeh.palettes’ (unknown location)

Fair enough, I stopped reading after noting the typo. The Spectral palette only goes up to Spectral11, there is no Spectral16. You can find all the built-in palettes (including some that do go up that high) here:

Otherwise, Bokeh palettes are just list/tuples of RGBA hex strings and you can construct any palette to suit your needs by hand.

Thanks, I’ll definitely need something with a higher number.

My pyCharm complains about every palette i try to import, but it looks like it works anyway.

Thanks again.

How is PyCharm complaining? I don’t see any issues in e.g. ipython: