前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Github项目推荐 | jupyterlab-dash:JupyterLab中Dash应用程序交互式开发的扩展程序

Github项目推荐 | jupyterlab-dash:JupyterLab中Dash应用程序交互式开发的扩展程序

作者头像
AI研习社
修改2019-08-07 17:42:25
2K0
修改2019-08-07 17:42:25
举报
文章被收录于专栏:AI研习社AI研习社AI研习社

jupyterlab-dash

这是一个JupyterLab扩展,用于将Plotly Dash应用程序渲染为JupyterLab中的单独窗口 ?

Github项目链接:

https://github.com/plotly/jupyterlab-dash

注意:此扩展目前不支持Windows或Python 2

安装前准备内容

  • JupyterLab

安装

jupyterlab-dash库需要Python包和JupyterLab扩展。

首先,使用pip安装Python包:

$ pip install jupyterlab-dash==0.1.0a2

或者用conda安装(但不是两个都用)。

$ conda install -c plotly jupyterlab-dash=0.1.0a2

然后安装JupyterLab 扩展:

$ jupyter labextension install jupyterlab-dash@0.1.0-alpha.2

开发安装

如果您想安装jupyterlab-dash进行开发,请使用以下命令:

$ 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 .

要重构JupyterLab扩展:

$ npm run build$ jupyter lab build

当源文件更改时,自动重构JupyterLab扩展:

# 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

使用

import jupyterlab_dashimport dashimport dash_html_components as html
viewer = jupyterlab_dash.AppViewer()
app = dash.Dash(__name__)
app.layout = html.Div('Hello World')
viewer.show(app)
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-04-09,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 AI研习社 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • jupyterlab-dash
  • 安装前准备内容
  • 安装
  • 开发安装
  • 使用
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档