jupyterlab-dash icon indicating copy to clipboard operation
jupyterlab-dash copied to clipboard

dash on Jupyterlab running in docker

Open zain910128 opened this issue 4 years ago • 3 comments

I'm running the python data science notebook docker image.

I tried enabling the dash extension from jupyterlab's extension manager, which did not work for me. I also tried following the instructions at: https://github.com/plotly/jupyterlab-dash#installation That also did not work.

Can someone please guide me on how to set it up in the environment I am using ?

The code I've run is:

!pip install jupyterlab_dash
!jupyter labextension install [email protected]
!jupyter labextension install jupyterlab-dash

# eveyrthing installs successfully

import jupyterlab_dash
import dash
import dash_html_components as html
viewer = jupyterlab_dash.AppViewer()
app = dash.Dash(__name__)
app.layout = html.Div('Hello World')
viewer.show(app)

Output:

Exception in thread Thread-105:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/conda/lib/python3.7/threading.py", line 1166, in run
    self.function(*self.args, **self.kwargs)
  File "/opt/conda/lib/python3.7/site-packages/jupyterlab_dash/__init__.py", line 71, in _perform_show
    """)
OSError: 
Unable to communicate with the jupyterlab-dash JupyterLab extension.
Is this Python kernel running inside JupyterLab with the jupyterlab-dash
extension installed?

You can install the extension with:

$ jupyter labextension install jupyterlab-dash

zain910128 avatar Apr 11 '20 15:04 zain910128

I hit the same issue. Might relate to permission.

[W 02:42:12.618 NotebookApp] 500 POST /lab/api/build?1587004926480 (172.17.0.1): [Errno 1] Operation not permitted: '/opt/conda/share/jupyter/lab/staging/index.js'
[W 02:42:12.619 NotebookApp] [Errno 1] Operation not permitted: '/opt/conda/share/jupyter/lab/staging/index.js'

suredream avatar Apr 16 '20 02:04 suredream

This is probably because of #37.

m0wer avatar Apr 24 '20 15:04 m0wer

I had also this issue, and I fixed it by installing jupyterlab=1.0.0 (instead of 1.2.0)

antvig avatar May 11 '20 08:05 antvig