Mag*_*ged 11 python libraries plotly jupyter jupyter-lab
Plotly 无法在 Jupyterlab 中运行。我认为所需的扩展存在冲突,但我不确定。在 Plotly https://plotly.com/python/troubleshooting/上检查故障排除时,他们建议删除扩展并再次安装。但我发现 Jupyterlab 更新附带了一个名为“ jupyterlab-plotly-extension ”的附加扩展,Plotly 在其说明中没有提到该扩展,以使其在 JupyterLab 中工作https://plotly.com/python/getting-started/ #jupyterlab-support-python-35
我的问题是:应该安装哪些扩展才能使 Plotly 在 JupyterLab 中工作?
小智 11
您可以使用 pip 或 conda 进行安装:
pip install "plotly>=5" "ipywidgets>=7.6"
# or if using conda
# conda install -c plotly "plotly>=5"
# conda install "ipywidgets>=7.6"
Run Code Online (Sandbox Code Playgroud)
Plotly 支持 Jupyter Notebook 和 JupyterLab。JupyterLab 3.0 及更高版本无需安装任何其他内容。plotly从 v5 开始,小部件包和渲染器包都包含在内。
对于旧版本的 JupyterLab(1.x 和 2.x),您需要安装最新的 Node.js 并安装其他软件包;如果使用较新版本的 JupyterLab,请勿运行这些命令:
pip install "plotly>=5" "ipywidgets>=7.6"
# or if using conda
# conda install -c plotly "plotly>=5"
# conda install "ipywidgets>=7.6"
Run Code Online (Sandbox Code Playgroud)
在终端或命令中输入“jupyter labextension list”以运行环境状态。下面的示例显示了我的环境信息,其中“jupyter lab”成功运行。
xxxxx-no-iMac:~ xxxxx$ jupyter labextension list
JupyterLab v2.1.5
Known labextensions:
app dir: /Library/Frameworks/Python.framework/Versions/3.6/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
@jupyterlab/git v0.20.0 enabled OK
@lckr/jupyterlab_variableinspector v0.5.0 enabled OK
jupyterlab-plotly v1.5.4 enabled OK
nbdime-jupyterlab v2.0.0 enabled OK
plotlywidget v1.5.4 enabled OK
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24329 次 |
| 最近记录: |