Use Bokeh in Apache Zeppelin

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Use Bokeh in Apache Zeppelin

Jeff Zhang

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.



Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

moon
Administrator
Cool. Thanks for sharing!

On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang <[hidden email]> wrote:

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.



Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

Raffaele S
This is something I was looking for, thanks!

2017-07-02 1:39 GMT+02:00 moon soo Lee <[hidden email]>:
Cool. Thanks for sharing!

On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang <[hidden email]> wrote:

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.




Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

CHALLA
Thank u I will check

On Wed, Jul 5, 2017 at 1:54 PM, Raffaele S <[hidden email]> wrote:
This is something I was looking for, thanks!

2017-07-02 1:39 GMT+02:00 moon soo Lee <[hidden email]>:
Cool. Thanks for sharing!

On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang <[hidden email]> wrote:

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.





Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

Sora Lee-2
​​
Wow, It looks great. And it would be useful and helpful.
I appreciate to share link!

Thanks,
Sora



2017-07-05 17:29 GMT+09:00 CHALLA <[hidden email]>:
Thank u I will check

On Wed, Jul 5, 2017 at 1:54 PM, Raffaele S <[hidden email]> wrote:
This is something I was looking for, thanks!

2017-07-02 1:39 GMT+02:00 moon soo Lee <[hidden email]>:
Cool. Thanks for sharing!

On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang <[hidden email]> wrote:

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.






Reply | Threaded
Open this post in threaded view
|

RE: Use Bokeh in Apache Zeppelin

Partridge, Lucas (GE Aviation)
In reply to this post by Jeff Zhang

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [mailto:[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: Use Bokeh in Apache Zeppelin

Partridge, Lucas (GE Aviation)

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: Use Bokeh in Apache Zeppelin

Partridge, Lucas (GE Aviation)

Hi Jeff,

 

I eventually managed to get Bokeh running in Zeppelin 0.7.0 after finding your code at https://pypkg.com/pypi/bkzep/f/bkzep/__init__.py . So I did ‘pip install bkzep’ and restarted Zeppelin. Then if I pasted this code of yours…

 

from bokeh.io import install_notebook_hook

from bkzep.io import load_notebook, _show_zeppelin_app_with_state, _show_zeppelin_doc_with_state

 

install_notebook_hook('zeppelin', load_notebook,

                      _show_zeppelin_doc_with_state, _show_zeppelin_app_with_state, overwrite=True)

 

…into a notebook paragraph before using Bokeh then I could see my plots directly within Zeppelin:).

Thanks, Lucas.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 15:01
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

Jeff Zhang

Awesome. Glad to see you can use bokeh in zeppelin. From bokeh after 0.12.7, you need bkzep. You can check the README here. https://github.com/zjffdu/bkzep

Actually you just need to import bkzep. You don't need to call install_notebook_hook explicitly. 



Partridge, Lucas (GE Aviation) <[hidden email]>于2018年1月10日周三 上午12:35写道:

Hi Jeff,

 

I eventually managed to get Bokeh running in Zeppelin 0.7.0 after finding your code at https://pypkg.com/pypi/bkzep/f/bkzep/__init__.py . So I did ‘pip install bkzep’ and restarted Zeppelin. Then if I pasted this code of yours…

 

from bokeh.io import install_notebook_hook

from bkzep.io import load_notebook, _show_zeppelin_app_with_state, _show_zeppelin_doc_with_state

 

install_notebook_hook('zeppelin', load_notebook,

                      _show_zeppelin_doc_with_state, _show_zeppelin_app_with_state, overwrite=True)

 

…into a notebook paragraph before using Bokeh then I could see my plots directly within Zeppelin:).

Thanks, Lucas.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 15:01


To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Use Bokeh in Apache Zeppelin

Partridge, Lucas (GE Aviation)

Thanks Jeff! I can confirm the following resulted in an inline graph when using a notebook bound to the Spark interpreter group in plain Zeppelin 0.7.0:

 

%pyspark

from bokeh.plotting import figure

from bokeh.io import show,output_notebook

import bkzep

output_notebook(notebook_type='zeppelin')

 

f = figure()

f.line(x=[1,2],y=[3,4])

show(f)

 

From: Jeff Zhang [mailto:[hidden email]]
Sent: 09 January 2018 23:24
To: Partridge, Lucas (GE Aviation) <[hidden email]>
Cc: [hidden email]
Subject: EXT: Re: Use Bokeh in Apache Zeppelin

 

 

Awesome. Glad to see you can use bokeh in zeppelin. From bokeh after 0.12.7, you need bkzep. You can check the README here. https://github.com/zjffdu/bkzep

 

Actually you just need to import bkzep. You don't need to call install_notebook_hook explicitly. 

 

 

 

Partridge, Lucas (GE Aviation) <[hidden email]>2018110日周三 上午12:35写道:

Hi Jeff,

 

I eventually managed to get Bokeh running in Zeppelin 0.7.0 after finding your code at https://pypkg.com/pypi/bkzep/f/bkzep/__init__.py . So I did ‘pip install bkzep’ and restarted Zeppelin. Then if I pasted this code of yours…

 

from bokeh.io import install_notebook_hook

from bkzep.io import load_notebook, _show_zeppelin_app_with_state, _show_zeppelin_doc_with_state

 

install_notebook_hook('zeppelin', load_notebook,

                      _show_zeppelin_doc_with_state, _show_zeppelin_app_with_state, overwrite=True)

 

…into a notebook paragraph before using Bokeh then I could see my plots directly within Zeppelin:).

Thanks, Lucas.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 15:01


To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Use Bokeh in Apache Zeppelin

Felix Cheung
Nice!
Get this in https://github.com/apache/zeppelin/blob/master/docs/interpreter/python.md?


From: Partridge, Lucas (GE Aviation) <[hidden email]>
Sent: Wednesday, January 10, 2018 2:27:19 AM
To: Jeff Zhang
Cc: [hidden email]
Subject: Use Bokeh in Apache Zeppelin
 

Thanks Jeff! I can confirm the following resulted in an inline graph when using a notebook bound to the Spark interpreter group in plain Zeppelin 0.7.0:

 

%pyspark

from bokeh.plotting import figure

from bokeh.io import show,output_notebook

import bkzep

output_notebook(notebook_type='zeppelin')

 

f = figure()

f.line(x=[1,2],y=[3,4])

show(f)

 

From: Jeff Zhang [mailto:[hidden email]]
Sent: 09 January 2018 23:24
To: Partridge, Lucas (GE Aviation) <[hidden email]>
Cc: [hidden email]
Subject: EXT: Re: Use Bokeh in Apache Zeppelin

 

 

Awesome. Glad to see you can use bokeh in zeppelin. From bokeh after 0.12.7, you need bkzep. You can check the README here. https://github.com/zjffdu/bkzep

 

Actually you just need to import bkzep. You don't need to call install_notebook_hook explicitly. 

 

 

 

Partridge, Lucas (GE Aviation) <[hidden email]>2018110日周三 上午12:35写道:

Hi Jeff,

 

I eventually managed to get Bokeh running in Zeppelin 0.7.0 after finding your code at https://pypkg.com/pypi/bkzep/f/bkzep/__init__.py . So I did ‘pip install bkzep’ and restarted Zeppelin. Then if I pasted this code of yours…

 

from bokeh.io import install_notebook_hook

from bkzep.io import load_notebook, _show_zeppelin_app_with_state, _show_zeppelin_doc_with_state

 

install_notebook_hook('zeppelin', load_notebook,

                      _show_zeppelin_doc_with_state, _show_zeppelin_app_with_state, overwrite=True)

 

…into a notebook paragraph before using Bokeh then I could see my plots directly within Zeppelin:).

Thanks, Lucas.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 15:01


To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: Use Bokeh in Apache Zeppelin

Partridge, Lucas (GE Aviation)

You *could* put it in those docs but it’s not specific to the %python interpreter. It works in %pyspark.  And I also wonder if it would work in %livy as well…?

 

From: Felix Cheung [mailto:[hidden email]]
Sent: 11 January 2018 07:11
To: [hidden email]; Jeff Zhang <[hidden email]>
Cc: [hidden email]
Subject: EXT: Re: Use Bokeh in Apache Zeppelin

 


From: Partridge, Lucas (GE Aviation) <[hidden email]>
Sent: Wednesday, January 10, 2018 2:27:19 AM
To: Jeff Zhang
Cc: [hidden email]
Subject: Use Bokeh in Apache Zeppelin

 

Thanks Jeff! I can confirm the following resulted in an inline graph when using a notebook bound to the Spark interpreter group in plain Zeppelin 0.7.0:

 

%pyspark

from bokeh.plotting import figure

from bokeh.io import show,output_notebook

import bkzep

output_notebook(notebook_type='zeppelin')

 

f = figure()

f.line(x=[1,2],y=[3,4])

show(f)

 

From: Jeff Zhang [[hidden email]]
Sent: 09 January 2018 23:24
To: Partridge, Lucas (GE Aviation) <[hidden email]>
Cc: [hidden email]
Subject: EXT: Re: Use Bokeh in Apache Zeppelin

 

 

Awesome. Glad to see you can use bokeh in zeppelin. From bokeh after 0.12.7, you need bkzep. You can check the README here. https://github.com/zjffdu/bkzep

 

Actually you just need to import bkzep. You don't need to call install_notebook_hook explicitly. 

 

 

 

Partridge, Lucas (GE Aviation) <[hidden email]>2018110日周三 上午12:35写道:

Hi Jeff,

 

I eventually managed to get Bokeh running in Zeppelin 0.7.0 after finding your code at https://pypkg.com/pypi/bkzep/f/bkzep/__init__.py . So I did ‘pip install bkzep’ and restarted Zeppelin. Then if I pasted this code of yours…

 

from bokeh.io import install_notebook_hook

from bkzep.io import load_notebook, _show_zeppelin_app_with_state, _show_zeppelin_doc_with_state

 

install_notebook_hook('zeppelin', load_notebook,

                      _show_zeppelin_doc_with_state, _show_zeppelin_app_with_state, overwrite=True)

 

…into a notebook paragraph before using Bokeh then I could see my plots directly within Zeppelin:).

Thanks, Lucas.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 15:01


To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

I forgot to say I’m using Bokeh 0.12.13.

 

From: Partridge, Lucas (GE Aviation)
Sent: 09 January 2018 13:24
To: [hidden email]
Cc: [hidden email]
Subject: EXT: RE: Use Bokeh in Apache Zeppelin

 

Hi Jeff,

 

Adding support for Bokeh in Zeppelin is great! At https://www.zepl.com/viewer/notebooks/bm90ZTovL3pqZmZkdS90ZXN0L2VhMGI0ODQ0MzNhYjQxNjZhODg5MjI1ZjAxZWVjMjdiL25vdGUuanNvbg it says:

 

“If you want to use bokeh in spark interpreter. You need HDP 2.6.0 (Zeppelin 0.7.0) or afterwards”

 

I’m not using HDP but I am using Zeppelin 0.7.0 (zeppelin-0.7.0-bin-all.tgz) in ubuntu 16.04. And when I do this in a notebook bound to the Spark interpreter group:

 

%pyspark

from bokeh.io import output_notebook

output_notebook(notebook_type='zeppelin')

 

I get this error:

 

Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 346, in <module>

    raise Exception(traceback.format_exc())

Exception: Traceback (most recent call last):

  File "/tmp/zeppelin_pyspark-8411751233295366188.py", line 339, in <module>

    exec(code)

  File "<stdin>", line 2, in <module>

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/output.py", line 114, in output_notebook

    run_notebook_hook(notebook_type, 'load', resources, verbose, hide_banner, load_timeout)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper

    return obj(*args, **kw)

  File "/home/lucas/.local/lib/python2.7/site-packages/bokeh/io/notebook.py", line 286, in run_notebook_hook

    raise RuntimeError("no display hook installed for notebook type %r" % notebook_type)

RuntimeError: no display hook installed for notebook type 'zeppelin'

 

Can you confirm Bokeh does work with the %pyspark interpreter in Zeppelin 0.7.0? Or should I move to a later version of Zeppelin? I’d rather stick with 0.7.0 for now if possible.

 

Thanks, Lucas.

 

From: Jeff Zhang [[hidden email]]
Sent: 02 July 2017 00:01
To: users <[hidden email]>
Subject: EXT: Use Bokeh in Apache Zeppelin

 

 

I write a tutorial on using bokeh in apache zeppelin. If you are interested in data visualization in zeppelin notebook, bokeh would be a very good library for you. And you can take a look at the tutorial here.