plot.ly offline mode in jupyter lab not displaying plots

A couple things might be happening. For some reason is your Notebook “Not Trusted?” This will stop the Plotly javascript from rendering anything below. Another possibility is that you don’t have the Plotly extension installed for Jupyter Lab. In Lab, as compared to Notebooks, there are a lot more restrictions on what javascript can execute, … Read more

Jupyter command `jupyter-lab` not found

Its the space. Its always the space. Never ever use spaces within package name. Its always either namepart1-namepart2 or namepart1namepart2. This is because arguments are separated by space. So if you put space in between, it makes pip think that you want to install two different packages named jupyter and lab. Just use: python -m … Read more

jupyterlab interactive plot

JupyterLab 3.0+ Install jupyterlab and ipympl. For pip users: pip install –upgrade jupyterlab ipympl For conda users: conda update -c conda-forge jupyterlab ipympl Restart JupyterLab. Decorate the cell containing plotting code with the header: %matplotlib widget # plotting code goes here JupyterLab 2.0 Install nodejs, e.g. conda install -c conda-forge nodejs. Install ipympl, e.g. conda … Read more

How to get ipywidgets working in Jupyter Lab?

JupyterLab now prefers a model where arbitrary javascript is no longer allowed to be embedded in a cell’s output, which is how many interactive Jupyter Notebook modules used to work. They now ask that modules with interactivity create a JupyterLab extension. ipywidgets provides @jupyter-widgets/jupyterlab-manager extension which satisfies this requirement. When using ipywidgets 7.6 or newer … Read more

How do I get the current IPython / Jupyter Notebook name

adding to previous answers, to get the notebook name run the following in a cell: %%javascript IPython.notebook.kernel.execute(‘nb_name = “‘ + IPython.notebook.notebook_name + ‘”‘) this gets you the file name in nb_name then to get the full path you may use the following in a separate cell: import os nb_full_path = os.path.join(os.getcwd(), nb_name)

Javascript Error: IPython is not defined in JupyterLab

Jupyter Lab does support interactive matplotlib through the jupyter-matplotlib extension. The installation procedure is slightly more involved, but works fine. Since the ipympl Jupyter Lab version requires NodeJS, and NodeJS requires Windows 8.1, ipympl also has this requirement. As before, it is important to invoke the iPython magic command before plotting: Usage: %matplotlib widget Installation: … Read more