我有最新/更新的Anaconda包。每次我尝试使用python 3.6.6绘制内容时,我在JupyterLab中收到以下错误...
Javascript错误:未定义IPython
当我使用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
需要使用Qazxswpoi和JupyterLab
%matplotlib inline