Jupyter Notebooks not displaying progress bars

The answer is in this GitHub issue. The key is to ensure that you have the ipywidgets notebook extension enabled using the following command: jupyter nbextension enable –py widgetsnbextension For the old JupyterLab 2.0 you’ll also need to install the JupyterLab extension: jupyter labextension install @jupyter-widgets/jupyterlab-manager For the old JupyterLab 2.0 installing the JupyterLab extension … Read more

Plotly chart not showing in Jupyter notebook

You need to change init_notebook_mode call and remove connected=True, if you want to work in offline mode. Such that: # Import the necessaries libraries import plotly.offline as pyo import plotly.graph_objs as go # Set notebook mode to work in offline pyo.init_notebook_mode() # Create traces trace0 = go.Scatter( x=[1, 2, 3, 4], y=[10, 15, 13, 17] … Read more

JupyterLab autocomplete without tab

The jupyterlab-lsp extension offers this as an opt-in feature. After installing the extension in JupyterLab 3.0+ (which is two part: jupyterlab-lsp and the language server of your choice – see the linked instructions) you need to enable it in Advanced Settings Editor → Code Completion → continuousHinting: Disclaimer: I am one of the authors. This … 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

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

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 add conda environment to jupyter lab

Assuming your conda-env is named cenv, it is as simple as : $ conda activate cenv # . ./cenv/bin/activate in case of virtualenv (cenv)$ conda install ipykernel (cenv)$ ipython kernel install –user –name=<any_name_for_kernel> (cenv)$ conda deactivate If you restart your jupyter notebook/lab you will be able to see the new kernel available. For newer versions … 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)