Code Monkey home page Code Monkey logo

jupyterlab-dash's Introduction

Announcement

This project has been replaced by the more capable JupyterDash project, and is no longer maintained. JuptyerDash supports multiple Jupyter contexts (not only JupyterLab), supports Windows as well as Linux and MacOS, supports JupyterLab 2.0, and adheres more closely to the traditional Dash API.

Note: For use in JupyterLab, JupyterDash makes use of the jupyterlab-dash JupyterLab extension that was originally developed in this repository. Development of this extension has also been moved to the JupyterDash repository.


jupyterlab-dash

Binder

A JupyterLab extension for rendering Plotly Dash apps as a separate window in JupyterLab 🎉

JupyterLab and Dash Demo Video

Note:: This extension does not currently support Windows or Python 2

Prerequisites

  • JupyterLab 1.0.0
  • Dash

Installation

The jupyterlab-dash library requires both a Python package and a JupyterLab extension.

First, install the Python package using either pip...

$ pip install "jupyterlab>=1.0" jupyterlab-dash==0.1.0a3

or conda (but not both!).

$ conda install -c plotly -c defaults -c conda-forge "jupyterlab>=1.0" jupyterlab-dash=0.1.0a3

Then, install the JupyterLab extension. v6.17.1 of node works, and node 8.x.x or 10+ should also work.

$ jupyter labextension install [email protected]

Development Installation

If you'd like to install jupyterlab-dash for development

$ git clone https://github.com/plotly/jupyterlab-dash
$ cd jupyterlab-dash

# Install Python package
$ pip install -e .

# Install Javascript dependencies
$ npm install # or yarn

# Build JupyterLab extension
$ npm run build # or yarn build
$ jupyter labextension link .

To rebuild the JupyterLab extension:

$ npm run build
$ jupyter lab build

To rebuild the JupyterLab extension automatically as the source changes:

# In one terminal tab, watch the jupyterlab-dash directory
$ npm run watch # or yarn watch

# In another terminal tab, run jupyterlab with the watch flag
$ jupyter lab --watch

Usage

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)

See a longer example

jupyterlab-dash's People

Contributors

anhvut avatar chriddyp avatar gnestor avatar jackparmer avatar jonmmease avatar michaelbabyn avatar timkpaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab-dash's Issues

ConnectionError: Unable to start Dash server

I've got a jupyterlab server, set up by colleagues & running in docker on a specific port (say 8080). I've naively set up jupyterlab dash, and running a simple dash app yields the following. If I set the port to 8080 in the app viewer, the first line is omitted but the error is the same. Any idea how I might troubleshoot and/or get some more logs for this issue?

INFO:werkzeug: * Running on http://localhost:46119/ (Press CTRL+C to quit)
---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
<ipython-input-10-8ef8c89fd51e> in <module>()
     24 ])
     25 
---> 26 viewer.show(app)

~/.conda/envs/compute/lib/python3.6/site-packages/jupyterlab_dash/__init__.py in show(self, app, *args, **kwargs)
     53 
     54     def show(self, app, *args, **kwargs):
---> 55         self._perform_show(0, app, *args, **kwargs)
     56 
     57     def _perform_show(self, tries, app, *args, **kwargs):

~/.conda/envs/compute/lib/python3.6/site-packages/jupyterlab_dash/__init__.py in _perform_show(self, tries, app, *args, **kwargs)
    108             self.server_process.start()
    109 
--> 110             self._show_when_server_is_ready()
    111 
    112     def _show_when_server_is_ready(self):

~/.conda/envs/compute/lib/python3.6/site-packages/jupyterlab_dash/__init__.py in _show_when_server_is_ready(self)
    137         else:
    138             # Failed to start development server
--> 139             raise ConnectionError('Unable to start Dash server')
    140 
    141     def terminate(self):

ConnectionError: Unable to start Dash server```

Create a demo binder

Great work on this! This makes the user experience of developing Dash applications much nicer in my opinion (e.g. develop them in the notebook, preview them in a JupyterLab tab right beside the notebook).

It would be great to add a binder badge to this repo and allow people to try it out on mybinder. If you're not familiar with binder, see the reactivepy repo which has a binder badge that will spin up a fresh JupyterLab environment with all the necessary dependencies installed and demo material included.

I can help with this. Since Dash starts its own server and mybinder doesn't allow access to arbitrary ports, the implementation will probably require jupyter-server-proxy. dask-labextension does something similar using nbserverproxy (the former version of jupyter-server-proxy).

Idea: Dash apps as JupyterLab mime renderers

This idea is not very fleshed out yet, and I'm not sure if it should even belong in this repo, but I wanted to write it out while I'm thinking about it.

JupyterLab supports the very flexible concept of Mime Renderer Extensions, which allow 3rd party extensions to create custom viewers/editors for various file types.

These are really powerful, but they involve writing the extension in JavaScript, and if the extension needs access to Python functionality there needs to be a corresponding server side extension. See see the jupyterlab-latex for an example of an extension that does mime rendering with a Python server component.

Because of this, the creation of custom mime renderer extensions is not very accessible to Python analysts without experience with web technologies.

Dash is now a mature technology for building sophisticated react-based web apps in pure Python. What would it take to allow special Dash apps to be registered as mime renderers? I'm picturing that the Dash apps would be registered as server extensions, and then a single JupyterLab extension would look for these server extensions, route mime renderer requests to the appropriate Dash app, and display the app in an iframe.

This would give extension authors access to a Python kernel and a rich set of react components, all from Python.

Two examples come immediately to mind.

  1. A Dash DataTable based viewer/editor for tabular datafiles. If the file could be loaded on the Python side then it wouldn't need to be all sent to the front-end at once, making it possible to support really large files. Could also support other tabular file types with Python readers like parquet.

  2. An image editor based on Dash-canvas and scikit-image

cc @chriddyp @jackparmer @nicolaskruchten @gnestor @ian-r-rose

Incompatible with HTTPS

When I test the example notebook in jupyter-dash/notebooks with an SSL enabled JupyterLab. I got an message complaining can't launch insecure connenction inside an secure connection. See the following message from Google Chrome Jave Script Console.

index.js:93 show
index.js:98 Create new widget
index.js:111 Widget was not attached, adding to main area
docklayout.js:455 Mixed Content: The page at 'https://192.168.120.3:8888/lab' was loaded over HTTPS, but requested an insecure resource 'http://localhost:8090/'. This request has been blocked; the content must be served over HTTPS.
lab:1 Mixed Content: The page at 'https://192.168.120.3:8888/lab' was loaded over HTTPS, but requested an insecure resource 'http://localhost:8090/'. This request has been blocked; the content must be served over HTTPS.

OS: Ubuntu 18.04 LTS
jupyterlab_dash: 0.1
dash: 0.36.0
dash-core-components: 0.43.0
dash-html-components: 0.13.5
dash-renderer: 0.17.0
dash-table: 3.2.0

Can't install node dependencies on WSL

> /opt/conda/bin/npm pack [email protected]
npm notice
npm notice �  [email protected]
npm notice === Tarball Contents ===
npm notice 0     package
npm notice 321B  CHANGELOG.md
npm notice === Tarball Contents ===
npm notice 0     package
npm notice 321B  CHANGELOG.md
npm notice 1.1kB LICENSE.txt
npm notice 1.6kB README.md
npm notice 0     lib
npm notice 1.2kB package.json
npm notice 0     style
npm notice 230B  lib/index.d.ts
npm notice 4.9kB lib/index.js
npm notice 100B  style/index.css
npm notice === Tarball Details ===
npm notice name:          jupyterlab-dash
npm notice version:       0.1.0-alpha.2
npm notice filename:      jupyterlab-dash-0.1.0-alpha.2.tgz
npm notice package size:  3.9 kB
npm notice unpacked size: 9.5 kB
npm notice shasum:        bd7e46bd153ecfc41b6c5c43b9bb2fc0977295a6
npm notice integrity:     sha512-m48N6pJlVQmNn[...]FEKT8F7AnR67A==
npm notice total files:   10
npm notice
jupyterlab-dash-0.1.0-alpha.2.tgz
Node v10.13.0

> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install

yarn install v1.9.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning css-loader > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.[3/5] Fetching packages...
[-----------------------------------------------------------------------] 0/833(node:2683) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info [email protected]: The platform "linux" is incompatible with this module.info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/[email protected]" has incorrect peer dependency "react@^15.6.1".
warning "@jupyterlab/vega4-extension > vega-embed > [email protected]" has unmet peer dependency "vega@*".
[5/5] Building fresh packages...success Saved lockfile.
Done in 57.77s.
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build
yarn run v1.9.4
$ webpackHash: dc8af5a882d6a837bb7a
Version: webpack 4.12.2
Time: 28858ms
Built at: 03/26/2019 5:56:09 PM
                                   Asset       Size        Chunks             Chunk Names
    vendors~vega.2ea76bfc25e70d59a551.js   2.95 MiB  vendors~vega  [emitted]  vendors~vega
    674f50d287a8c48dc19ba404d20fe713.eot    162 KiB                [emitted]
    912ec66d7572ff821749319396470bde.svg    434 KiB                [emitted]
   fee66e712a8a08eef5805a46892932ad.woff   95.7 KiB                [emitted]
    b06871f281fee6b241d60582ae9369b9.ttf    162 KiB                [emitted]
            main.57e42f2e017516caf7d0.js   53.3 KiB          main  [emitted]  main
               0.cc98107762fcc28532b3.js    4.5 KiB             0  [emitted]
            vega.91b98e783d16fd1b9e23.js  519 bytes          vega  [emitted]  vega
    vendors~main.425d1407ebaba54b83b1.js   8.06 MiB  vendors~main  [emitted]  vendors~main
  af7ae505a9eed503f8b8e6982036873e.woff2   75.4 KiB                [emitted]
               1.055322dcf6c2bb19185f.js    888 KiB             1  [emitted]
        main.57e42f2e017516caf7d0.js.map     62 KiB          main  [emitted]  main
           0.cc98107762fcc28532b3.js.map   5.73 KiB             0  [emitted]
        vega.91b98e783d16fd1b9e23.js.map  251 bytes          vega  [emitted]  vega
vendors~main.425d1407ebaba54b83b1.js.map   9.28 MiB  vendors~main  [emitted]  vendors~main
vendors~vega.2ea76bfc25e70d59a551.js.map    2.3 MiB  vendors~vega  [emitted]  vendors~vega
           1.055322dcf6c2bb19185f.js.map   1.04 MiB             1  [emitted]
                              index.html   1.54 KiB                [emitted]
Entrypoint main = vendors~main.425d1407ebaba54b83b1.js vendors~main.425d1407ebaba54b83b1.js.map main.57e42f2e017516caf7d0.js main.57e42f2e017516caf7d0.js.map
 [0] multi whatwg-fetch ./build/index.out.js 40 bytes {main} [built]
 [1] vertx (ignored) 15 bytes {main} [optional] [built]
 [2] util (ignored) 15 bytes {main} [built]
 [4] buffer (ignored) 15 bytes {main} [optional] [built]
 [5] crypto (ignored) 15 bytes {main} [optional] [built]
 [6] readable-stream (ignored) 15 bytes {main} [built]
 [8] chalk (ignored) 15 bytes {main} [built]
 [9] fs (ignored) 15 bytes {main} [built]
[10] node-fetch (ignored) 15 bytes {vega} [built]
[11] fs (ignored) 15 bytes {vega} [built]
 [ANye] ./build/index.out.js 34.9 KiB {main} [built]
 [RnhZ] ./node_modules/moment/locale sync ^\.\/.*$ 2.88 KiB {main} [optional] [built]
 [YuTi] (webpack)/buildin/module.js 497 bytes {vendors~main} [built]
 [eTbV] ./node_modules/codemirror/mode sync ^\.\/.*\.js$ 2.78 KiB {0} [built]
 [yLpj] (webpack)/buildin/global.js 489 bytes {vendors~main} [built]
    + 2428 hidden modules

WARNING in d3-array
  Multiple versions of d3-array found:
    1.2.4 ./~/d3-scale/~/d3-array from ./~/d3-scale/~/d3-array/src/index.js
    2.0.3 ./~/d3-array from ./~/d3-array/src/index.js


WARNING in vega-lite
  Multiple versions of vega-lite found:
    2.5.1 ./~/vega-lite/build/src from ./~/vega-lite/build/src/compile/selection/selection.js
    2.6.0 ./~/vega-lite/build from ./~/vega-lite/build/src/index.js

Check how you can resolve duplicate packages: 
https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle

Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [KTNU] ./node_modules/html-loader!./templates/partial.html 567 bytes {0} [built]
    [YuTi] (webpack)/buildin/module.js 497 bytes {0} [built]
    [aS2v] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/template.html 1.22 KiB {0} [built]
    [yLpj] (webpack)/buildin/global.js 489 bytes {0} [built]
        + 1 hidden module
Done in 36.50s.

binder badge broken

app does not render.

Exception in thread Thread-104:
Traceback (most recent call last):
  File "/srv/conda/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/srv/conda/lib/python3.7/threading.py", line 1158, in run
    self.function(*self.args, **self.kwargs)
  File "/home/jovyan/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

running that suggested command does not help.

"[email protected]" is not compatible with the current JupyterLab

  1. install
pip install "jupyterlab>=1.0" jupyterlab-dash==0.1.0a3
jupyter labextension install [email protected]

error log

An error occured.
ValueError: 
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension      Package
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/application
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/notebook
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/console
See the log file for details:  /tmp/jupyterlab-debug-vnxt001y.log

change jupyterlab>=1.0 to jupyterlab==1.0 worked

How to run in debug mode and view the errors

How can I run the viewer.show(app) in debug=True mode to quickly check for bugs and typos.

If i run the code using the standard Dash way python dash_graph.py with debug=True it is quite easy to spot mistakes. Is there a way using this extension to do the same?

image

Add support for Windows

This looks great, but I see that Windows isn't currently supported. It would be lovely to have this extension available to us

[email protected]" is not compatible with the current JupyterLab 1.0

Hi,

I'm trying to install jupyterlab-dash with jupyterlab 1.0.0, but am getting the following error:

build	01-Jul-2019 14:15:16	The following NEW packages will be INSTALLED:
build	01-Jul-2019 14:15:16	
build	01-Jul-2019 14:15:16	    json5:             0.8.4-py_0  
build	01-Jul-2019 14:15:16	    jupyterlab:        1.0.0-py36_0
build	01-Jul-2019 14:15:16	    jupyterlab_server: 1.0.0-py_0  
build	01-Jul-2019 14:15:16	
...
...
...
build	01-Jul-2019 14:15:21	�[91mEnabling: jupyterlab
build	01-Jul-2019 14:15:21	- Writing config: /opt/conda/envs/lab/etc/jupyter
build	01-Jul-2019 14:15:21	�[0m�[91m    - Validating...
build	01-Jul-2019 14:15:21	�[0m�[91m      jupyterlab 1.0.0 �[32mOK�[0m
build	01-Jul-2019 14:15:29	�[0mFetching package metadata .........................
build	01-Jul-2019 14:15:53	Solving package specifications: .
build	01-Jul-2019 14:15:53	
build	01-Jul-2019 14:15:53	Package plan for installation in environment /opt/conda/envs/lab:
build	01-Jul-2019 14:15:53	
build	01-Jul-2019 14:15:53	The following NEW packages will be INSTALLED:
build	01-Jul-2019 14:15:53	
build	01-Jul-2019 14:15:53	    aiohttp:              3.5.4-py36h14c3975_0   
build	01-Jul-2019 14:15:53	    async-timeout:        3.0.1-py_1000          
build	01-Jul-2019 14:15:53	    click:                7.0-py_0               
build	01-Jul-2019 14:15:53	    dash:                 0.43.0-py_0            
build	01-Jul-2019 14:15:53	    dash-core-components: 0.48.0-py_0            
build	01-Jul-2019 14:15:53	    dash-html-components: 0.16.0-py_0            
build	01-Jul-2019 14:15:53	    dash-renderer:        0.24.0-py_0            
build	01-Jul-2019 14:15:53	    dash-table:           3.7.0-py_0             
build	01-Jul-2019 14:15:53	    flask:                1.0.3-py_0             
build	01-Jul-2019 14:15:53	    flask-compress:       1.4.0-py36_0           
build	01-Jul-2019 14:15:53	    idna_ssl:             1.1.0-py36_1000        
build	01-Jul-2019 14:15:53	    itsdangerous:         1.1.0-py_0             
build	01-Jul-2019 14:15:53	    jupyter-server-proxy: 1.1.0-py_0             
build	01-Jul-2019 14:15:53	    jupyterlab-dash:      0.1.0a2-py_0           
build	01-Jul-2019 14:15:53	    multidict:            4.5.2-py36h14c3975_1000
build	01-Jul-2019 14:15:53	    plotly:               3.10.0-py_0            
build	01-Jul-2019 14:15:53	    retrying:             1.3.3-py_2             
build	01-Jul-2019 14:15:53	    simpervisor:          0.3-py_1               
build	01-Jul-2019 14:15:53	    typing_extensions:    3.7.4-py36_0           
build	01-Jul-2019 14:15:53	    werkzeug:             0.15.4-py_0            
build	01-Jul-2019 14:15:53	    yarl:                 1.3.0-py36h14c3975_1000
build	01-Jul-2019 14:15:53	
build	01-Jul-2019 14:15:53	Proceed ([y]/n)? 
...
...
...
An error occured.
build	01-Jul-2019 14:17:12	ValueError: 
build	01-Jul-2019 14:17:12	"[email protected]" is not compatible with the current JupyterLab
build	01-Jul-2019 14:17:12	Conflicting Dependencies:
build	01-Jul-2019 14:17:12	JupyterLab              Extension      Package
build	01-Jul-2019 14:17:12	>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/application
build	01-Jul-2019 14:17:12	>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/console
build	01-Jul-2019 14:17:12	>=1.0.0 <2.0.0          >=0.19.2 <0.20.0@jupyterlab/notebook
build	01-Jul-2019 14:17:12	See the log file for details:  /tmp/jupyterlab-debug-zjcon8kt.log
build	01-Jul-2019 14:17:14	Removing intermediate container e9d21e6841f0

Is jupyterlab-dash compatible with the newest jupyterlab version?

How to use jupyterlab-dash in an offline environment

Hello,

I want to use Dash with interactive coding in Jupyterlab within an offline Environment behind corporate Firewall. I already installed Dash and when I publish an App the Renderer Works.

Now I wanted to install the jupyterlab-dash and I need your help.
This are my installed dash-components:
1

I was able to use pip install jupyterlab>=1.0" jupyterlab-dash with our local repo.
But I'm running into Problems when trying to use jupyter labextension install jupyterlab-dash:
2

When I look at the log file I can see that it checked if i have nodejs installed (which I don't),
it then tries to install node.js but isn't able to in this offline Environment.
I also don't have npm installed.
3

Is there anyway to install jupyterlab-dash in an offline environment or isn't it possible to provide all dependencies offline?

cross-reference: https://community.plot.ly/t/how-to-use-jupyterlab-dash-in-an-offline-environment/29888

Issue: no module named queue

I am installing jupyterlab-dash on my subsystem Ubuntu in Windows 10. While running jupyterlab and import the module, I have the following error message:
image
It seems that Jupyter Lab loads python 2.7 which lacks the queue.py module. Is there anyway to solve this issue? Thanks!


I tried solve the issue by running:
sudo pip install future
python3 -m pip install ipykernel
python3 -m ipykernel install --user
python3 -m pip install dash

After these, by changing Jupyter Lab's kernel to Python 3, I had no problems importing the package. But when I run the testing codes, the viewer.show(app) doesn't generate any output.

Add Support for Sharereable dash link

Hi,

I would love to see a feature that allows jupyterlab-dash applications to be created with a shareable link. We're finding it's really cool so far, but for our users we would love to just share a link directly to a our dash without having to physically run the notebook first

Does this feature exists already, or is there a way to provide similar functionality?

Thanks!

Installation npm run build

I am using installation instructions. I can't seem to get to run:
npm run build

it is giving me the following error:

[email protected] build /home/hamza/jupyterlab-dash
tsc

/usr/bin/env: ‘node’: No such file or directory

npm ERR! Linux 4.4.0-141-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: tsc
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jupyterlab_dash package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs jupyterlab_dash
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls jupyterlab_dash
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/hamza/jupyterlab-dash/npm-debug.log

how do I fix this?

ENH: Inline mode

Currently Dash apps are opened in a separate JupyterLab tab. I think this is right approach when folks are developing full dashboards because the tab can be expanded to a full page size.

But it might be interesting to also support displaying apps inline in the notebook. My though here is that this would allow people to use Dash apps as FigureWidget/ipywidget alternatives for building small notebook control panels.

Retrieve components properties outside of dash app

I have the following usecase: I would like to have a jupyter notebook in jupyterlab where I do some computations (say, on images), then create a dash app to process my data, and then retrieve (back) the value of some component properties (for example an image generated by a segmentation made from users annotations), so that I can continue the computations in the notebook. Is this possible at the moment?

I'm happy to give more explanations or provide a notebook with some mock-up code if it's clearer.

Apps only rendering partially

I'm running JupyterLab through AWS SageMaker. I've downloaded the dash-sample-apps repository and modified a couple of the app.py files with:

import jupyterlab_dash
viewer = jupyterlab_dash.AppViewer()
viewer.show(app)

When I run one of these sample apps from a jupyterlab cell like this:
%run -i '/home/ec2-user/SageMaker/dash-sample-apps/apps/dash-live-model-training/app.py'

The Dash pane pops up, and the app loads, but only partially. Very simple apps seem to load in their entirety, but more complicated graphics don't get displayed.

Here are two examples of partial loading:

Screenshot 2019-07-27 19 15 04

Screenshot 2019-07-27 19 14 08

And here is my pip freeze:

absl-py==0.7.1
aiohttp==3.5.4
alabaster==0.7.10
alembic==1.0.11
anaconda-client==1.6.14
anaconda-project==0.8.2
asn1crypto==0.24.0
astor==0.7.1
astroid==1.6.3
astropy==3.0.2
async-generator==1.10
async-timeout==3.0.1
attrs==18.1.0
Automat==0.3.0
autovizwidget==0.12.9
awscli==1.16.135
Babel==2.5.3
backcall==0.1.0
backports.shutil-get-terminal-size==1.0.0
bcrypt==3.1.6
beautifulsoup4==4.6.0
bitarray==0.8.1
bkcharts==0.2
blaze==0.11.3
bleach==2.1.3
bokeh==1.3.0
boto==2.48.0
boto3==1.9.196
botocore==1.12.196
Bottleneck==1.2.1
cached-property==1.5.1
certifi==2019.3.9
cffi==1.11.5
characteristic==14.3.0
chardet==3.0.4
click==6.7
cloudpickle==0.5.3
clyent==1.2.2
colorama==0.3.9
colorlover==0.3.0
contextlib2==0.5.5
crcmod==1.7
cryptography==2.3.1
cycler==0.10.0
Cython==0.28.4
cytoolz==0.9.0.1
dash==1.0.2
dash-core-components==1.0.0
dash-daq==0.1.0
dash-html-components==1.0.0
dash-player==0.0.1
dash-renderer==1.0.0
dash-table==4.0.2
dask==0.17.5
datashape==0.5.4
decorator==4.3.0
defusedxml==0.5.0
distributed==1.21.8
docker==3.7.0
docker-compose==1.24.1
docker-pycreds==0.4.0
dockerpty==0.4.1
docopt==0.6.2
docutils==0.14
entrypoints==0.2.3
environment-kernels==1.1.1
et-xmlfile==1.0.1
fastcache==1.0.2
filelock==3.0.4
Flask==1.0.2
Flask-Compress==1.4.0
Flask-Cors==3.0.4
fuckit==4.8.1
gast==0.2.2
gevent==1.3.0
glob2==0.6
gmpy2==2.0.8
google-pasta==0.1.7
greenlet==0.4.13
grpcio==1.10.1
h5py==2.8.0
hdijupyterutils==0.12.7
heapdict==1.0.0
horovod==0.16.1
html5lib==1.0.1
idna==2.6
idna-ssl==1.1.0
imageio==2.3.0
imagesize==1.0.0
imgaug==0.2.9
ipykernel==4.8.2
ipyparallel==6.2.2
ipython==7.7.0
ipython-genutils==0.2.0
ipywidgets==7.5.0
isort==4.3.4
itsdangerous==0.24
jdcal==1.4
jedi==0.12.0
Jinja2==2.10
jmespath==0.9.4
json5==0.8.5
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.3.1
jupyter-console==5.2.0
jupyter-core==4.4.0
jupyter-server-proxy==1.1.0
jupyterhub==0.9.4
jupyterlab==1.0.4
jupyterlab-dash==0.1.0a3
jupyterlab-launcher==0.10.5
jupyterlab-server==1.0.0
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.0.9
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
llvmlite==0.23.1
locket==0.2.0
lxml==4.2.1
Mako==1.0.14
Markdown==3.1
MarkupSafe==1.0
matplotlib==2.2.2
mccabe==0.6.1
mistune==0.8.3
mkl-fft==1.0.0
mkl-random==1.0.1
mock==3.0.5
more-itertools==4.1.0
mpmath==1.0.0
msgpack==0.6.0
msgpack-python==0.5.6
multidict==4.5.2
multipledispatch==0.5.0
nb-conda==2.2.1
nb-conda-kernels==2.2.1
nbconvert==5.4.1
nbformat==4.4.0
networkx==2.1
nltk==3.3
nose==1.3.7
notebook==6.0.0
numba==0.38.0
numexpr==2.6.5
numpy==1.17.0
numpydoc==0.8.0
odo==0.5.1
olefile==0.45.1
opencv-python==4.1.0.25
opencv-python-headless==4.1.0.25
openpyxl==2.5.3
opt-einsum==2.3.2
packaging==17.1
pamela==1.0.0
pandas==0.22.0
pandocfilters==1.4.2
paramiko==2.4.2
parso==0.2.0
partd==0.3.8
path.py==11.0.1
pathlib2==2.3.2
patsy==0.5.0
pep8==1.7.1
pexpect==4.5.0
pickleshare==0.7.4
Pillow==6.1.0
Pillow-SIMD==6.0.0.post0
pipdeptree==0.13.2
pkginfo==1.4.2
plotly==3.2.1
pluggy==0.6.0
ply==3.11
prometheus-client==0.7.1
prompt-toolkit==2.0.9
protobuf==3.6.1
protobuf3-to-dict==0.1.5
psutil==5.4.5
psycopg2==2.7.5
ptyprocess==0.5.2
py==1.5.3
py4j==0.10.7
pyasn1==0.4.5
pycodestyle==2.4.0
pycosat==0.6.3
pycparser==2.18
pycrypto==2.6.1
pycurl==7.43.0.1
pyflakes==1.6.0
pygal==2.4.0
Pygments==2.2.0
pykerberos==1.2.1
pylint==1.8.4
PyNaCl==1.3.0
pyodbc==4.0.23
pyOpenSSL==18.0.0
pyparsing==2.2.0
pyrsistent==0.15.3
PySocks==1.6.8
pyspark==2.3.2
pytest==3.5.1
pytest-arraydiff==0.2
pytest-astropy==0.3.0
pytest-doctestplus==0.1.3
pytest-openfiles==0.3.0
pytest-remotedata==0.2.1
python-dateutil==2.7.3
python-editor==1.0.4
python-oauth2==1.1.1
python-voc-parser==1.0.0
pytz==2018.4
PyWavelets==0.5.2
PyYAML==5.1.1
pyzmq==17.0.0
QtAwesome==0.4.4
qtconsole==4.3.1
QtPy==1.4.1
requests==2.20.1
requests-kerberos==0.12.0
retrying==1.3.3
rope==0.10.7
rsa==3.4.2
ruamel-yaml==0.15.35
s3fs==0.1.5
s3transfer==0.2.0
sagemaker==1.34.2
sagemaker-pyspark==1.2.4
scikit-image==0.15.0
scikit-learn==0.20.3
scipy==1.1.0
seaborn==0.8.1
Send2Trash==1.5.0
Shapely==1.6.4.post2
simpervisor==0.3
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snowballstemmer==1.2.1
sortedcollections==0.6.1
sortedcontainers==1.5.10
sparkmagic==0.12.5
Sphinx==1.7.4
sphinxcontrib-websupport==1.0.1
spyder==3.2.8
SQLAlchemy==1.2.11
statsmodels==0.9.0
sympy==1.1.1
tables==3.4.3
tblib==1.3.2
tensorboard==1.10.0
tensorflow-gpu==1.10.1
termcolor==1.1.0
terminado==0.8.1
testpath==0.3.1
texttable==0.9.1
toolz==0.9.0
torch==1.1.0
tornado==5.1.1
tqdm==4.32.2
traitlets==4.3.2
typing==3.6.4
typing-extensions==3.7.4
unicodecsv==0.14.1
urllib3==1.23
wcwidth==0.1.7
webencodings==0.5.1
websocket-client==0.55.0
Werkzeug==0.14.1
widgetsnbextension==3.5.0
wrapt==1.11.2
xlrd==1.1.0
XlsxWriter==1.0.4
xlwt==1.3.0
yarl==1.3.0
zict==0.1.3

Any idea why this is occurring?

dash on Jupyterlab running in docker

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

An exception has occured

Hello, I'm new to python and to plotly. I'm trying to generate a 3D surface plot from data generated froma series of FTIR scans. I've installed the libraries using conda in an environment on my Mac. I can run the hello world example in jupyter lab but copying a new example from the plotly dash website (https://dash.plot.ly/interactive-graphing) to figure out how the code works i get the following error?

Running on http://127.0.0.1:8050/
Debugger PIN: 708-478-825

  • Serving Flask app "main" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
    An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
/usr/local/miniconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3333: UserWarning:

To exit: use 'exit', 'quit', or Ctrl-D.

Re-runing the hello world example I then get the error that the address is already in use - suggesting that the server is running?

opening chrome with http://127.0.0.1:8050/ just gives a blank page thta keeps trying to update.

Also if i try ploting with plotly the code runs and space for the plot appears undernether the code but no plot is rendered?

Thanks,
Ollie

The web page does not update until I kill the server

Hi,
On my Mac everything works fine, but after changing some text in my dash application and do RUN command the dash tab content is not updating with message Unable to start Dash server (when I kill the process of that web server, it runs OK). I noticed similar issue with dash applications: https://community.plot.ly/t/dash-server-not-updating-through-examples-not-able-to-stop-the-previous-server/6419 How do you manage to see updates without stopping the server?
Regards, Victor

Unable to communicate with the jupyterlab-dash JupyterLab extension.

Hi there,

When I am trying to run Dash in Jupyter Notebook, I am getting following error -

Exception in thread Thread-105:
Traceback (most recent call last):
File "/Users/ssaurabh/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/ssaurabh/anaconda3/lib/python3.7/threading.py", line 1158, in run
self.function(*self.args, **self.kwargs)
File "/Users/ssaurabh/anaconda3/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

Any idea how I need to run my Python Kernel?

Thanks,
Sangeet

404: not found Error

I just pip installed jupyterlab_dash using the instructions of the README. When inside jupyter lab I use the minimal working example of the Readme, in the tab of the app I get "404 : Not Found You are requesting a page that does not exist!". I tried both with firefox and chromium.
The cell I used is

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)

Maybe I'm missing something obvious... I'll try later with a more recent version of jupyter.

emma@hopper:~$ jupyter --version
4.4.0
emma@hopper:~$ jupyter notebook --version
5.2.2

JupyterLab web browser tab showing white screen only

After installing and enabling jupyterlab-dash in a JupyterLab dev setup and running JupyterLab with jupyter lab the JupyterLab tab in the web browser is showing a white screen without any content.

My configuration:

>jupyter labextension list
JupyterLab v1.0.5
Known labextensions:
   app dir: <SOME-VIRTUAL-ENV>\share\jupyter\lab
        @jupyter-widgets/jupyterlab-manager v1.0.2 enabled  ok
        @jupyterlab/plotly-extension v1.0.0 enabled  ok
        jupyterlab-chart-editor v1.2.0 enabled  ok
        jupyterlab-dash v0.1.0-alpha.3 enabled  ok
        jupyterlab-plotly v1.1.0 enabled  ok
        plotlywidget v1.1.0 enabled  ok

Running JupyterLab with the pinned dependencies via jupyter lab --core-mode works as usual.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.