2024-10-05 13:25:27 发布
网友
我有最新的水蟒包。每次我试图使用Python3.6.6绘制一些东西时,我都会在JupyterLab中得到以下错误。。。
Javascript Error: IPython is not defined
当我使用ipython内核在Spyder中运行相同的代码时,它工作得很好。一直在网上到处找,但似乎不知道发生了什么。 任何帮助都将不胜感激。
Jupyter Lab通过jupyter-matplotlib extension支持交互式matplotlib。安装过程稍微复杂一些,但工作正常。
与之前一样,在打印之前调用iPython magic命令非常重要:
%matplotlib widget
conda install -c conda-forge ipympl # If using the Notebook conda install -c conda-forge widgetsnbextension # If using JupyterLab conda install nodejs jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter labextension install jupyter-matplotlib
pip install ipympl # If using JupyterLab conda install nodejs jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter labextension install jupyter-matplotlib
%matplotlib笔记本在interact中不工作,现在需要使用%matplotlib inline
%matplotlib inline
添加:
在绘制图表之前。
Quoted from
需要与JupyterLab一起使用%matplotlib inline
%matplotlib inline import matplotlib.pyplot as plt plt.plot([1,2,3])
Jupyter Lab通过jupyter-matplotlib extension支持交互式matplotlib。安装过程稍微复杂一些,但工作正常。
与之前一样,在打印之前调用iPython magic命令非常重要:
用法:
%matplotlib widget
安装:
使用conda
使用pip
%matplotlib笔记本在interact中不工作,现在需要使用
%matplotlib inline
添加:
在绘制图表之前。
Quoted from
需要与JupyterLab一起使用
%matplotlib inline
相关问题 更多 >
编程相关推荐