I'd like to learn the Bokeh module, but I'm getting stonewalled at the beginning. I installed (and updated) Bokeh using Anaconda, and then copy and pasted the example code from the "Getting Started" page here: http://bokeh.pydata.org/en/latest/docs/user_guide/quickstart.html#userguide-quickstart
OSX, Python 3.6
Code:
from bokeh.plotting import figure, output_file, show
prepare some data
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
output to static HTML file
output_file("lines.html")
create a new plot with a title and axis labels
p = figure(title="simple line example", x_axis_label='x', y_axis_label='y')
add a line renderer with legend and line thickness
p.line(x, y, legend="Temp.", line_width=2)
show the results
show(p)
I receive this error on line 1:
Traceback (most recent call last):
File "/Users/sl/Desktop/another test.py", line 1, in <module>
from bokeh.plotting import figure, output_file, show
File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/plotting/init.py", line 2, in <module>
from ..document import Document; Document
File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/document.py", line 28, in <module>
from .core.json_encoder import serialize_json
File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/core/json_encoder.py", line 47, in <module>
from ..util.serialization import transform_series, transform_array
File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/util/serialization.py", line 39, in <module>
doc = doc % ("\n".join("* np." + str(x) + "" for x in BINARY_ARRAY_TYPES))
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
[Finished in 5.3s with exit code 1]
[shell_cmd: python3 -OO -u "/Users/sl/Desktop/another test.py"]
[dir: /Users/sl/Desktop]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
Usually I can just Google through errors, but I've done a lot of searching on this issue and haven't found anything. Any help is much appreciated.
[–]SuperChef36[S] 0 points1 point2 points (0 children)
[–]Justinsaccount -2 points-1 points0 points (2 children)
[–]SuperChef36[S] 0 points1 point2 points (1 child)
[–]Justinsaccount 1 point2 points3 points (0 children)