Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/355.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python JupyterLab中Plotly的正确扩展是什么?_Python_Plotly_Jupyter_Libraries_Jupyter Lab - Fatal编程技术网

Python JupyterLab中Plotly的正确扩展是什么?

Python JupyterLab中Plotly的正确扩展是什么?,python,plotly,jupyter,libraries,jupyter-lab,Python,Plotly,Jupyter,Libraries,Jupyter Lab,Plotly不在Jupyterlab工作。我假设在所需的扩展中存在冲突,但我不确定。 在Plotly上检查故障排除时,他们建议拆下扩展插件并重新安装。 但我发现Jupyterlab更新附带了一个名为“Jupyterlab plotly extension”的附加扩展 在他们的指示中没有详细提到这一点,以使其在JupyterLab中工作 我的问题是:应该安装哪些扩展以使Plotly在JupyterLab中工作 如plotly support中所述的jupyterlab plotly jupyte

Plotly不在Jupyterlab工作。我假设在所需的扩展中存在冲突,但我不确定。 在Plotly上检查故障排除时,他们建议拆下扩展插件并重新安装。 但我发现Jupyterlab更新附带了一个名为“Jupyterlab plotly extension”的附加扩展 在他们的指示中没有详细提到这一点,以使其在JupyterLab中工作

我的问题是:应该安装哪些扩展以使Plotly在JupyterLab中工作

  • 如plotly support中所述的jupyterlab plotly
  • jupyterlab是jupyterlab附带的扩展

您可以使用pip或conda进行绘图安装:

pip-install-plotly==4.8.2
conda-install-c-plotly-plotly=4.8.2

Plotly同时支持jupyter笔记本和jupyterLab

要在jupyter笔记本中使用,请使用:

pip安装“笔记本>=5.3”“ipywidgets>=7.2”

要在JupyterLab中使用,请使用:

pip安装jupyterlab“ipywidgets>=7.5

然后为JupyterLab运行以下操作:

#渲染器支持

jupyter labextension安装jupyter Lab-plotly@4.8.2

#可选:Jupyter小部件扩展

jupyter-labextension安装@jupyter-widgets/jupyterlab-managerplotlywidget@4.8.2

确保使用Python>=3.5,并且应该安装节点
然后运行jupyter lab/笔记本

在终端或命令中输入“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
upyterLab支持(Python 3.5+) 要在JupyterLab中使用,请使用pip安装JupyterLab和ipywidgets包

$pip安装jupyterlab“ipywidgets>=7.5” 或者康达

$conda安装jupyterlab“ipywidgets=7.5” 然后运行以下命令以安装所需的JupyterLab扩展(请注意,这将需要安装节点):

JupyterLab渲染器支持 jupyter labextension安装jupyterlab-plotly@4.12.0

可选:Jupyter小部件扩展 jupyter labextension安装@jupyter widgets/jupyterlab managerplotlywidget@4.12.0

参考:

假设您已正确安装了所有库(确保已安装并安装),并且假设有一个库正在使用
conda
,请访问
conda提示符
,以了解一个库正在工作的环境(“服务器”环境)

然后,您需要以绘图方式安装扩展插件jupyterlab(现在需要该库)

plotlywidget
[可选]-这一个需要nodejs>=10.0.0

jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.14.1


有关更详细的解释,您可能需要阅读。

答案是Plotly支持页面的摘要。我的问题没有回答!不确定您在这里说的是什么,安装了上述设备后,您可以在jupyterlab中看到Plotly输出?这些是所需的最小数量吗?@baxx我的回答是如何检查Plotly扩展是否正确ion已在jupterlab中正确安装。有关安装扩展,请参阅其他答案。
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.14.1