Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Hackers And Slackers profile imageTodd Birchard
Todd Birchard forHackers And Slackers

Posted on • Originally published athackersandslackers.com on

     

Upgrading to JupyterLab on Ubuntu

Upgrading to JupyterLab on Ubuntu

Last we chatted, we walked through the process of getting started withJupyter notebooks on a Ubuntu server. The classic Jupyter notebook interface is certainly well-suited to the job done. That said, it only takes some time of getting lost in the interface to start thinking we can do better. That's where Jupyter Lab comes in.

Why JupyterLab?

JupyterLab is sometimes referred to as "the next generation of Jupyter notebooks," which is a statement I can attest to. JupyterLab offers an improved interface for Jupyter notebooks which is both available out of the box, as well as highly customizable for your workflow.

Out of the box, the traditional Jupyter interface is extended to include a tree file manager: similar to what you might expect from an IDE. This allows you to easily browseall available notebooks on your server. In addition, the notebook interface has been simplified to reduce noise brought on by (mostly useless) toolbars and excessive buttons. Take a look at the interface prior to any customization:

Upgrading to JupyterLab on Ubuntu

Even more appealing than an updated interface is JupyterLab's openness tocustomization. JupyterLab has a strongly growing ecosystem for extension development: we'll be getting a taste of some of those goodies in just a moment.

Getting Started

If you're starting from scratch, go ahead and follow the same steps in theJupyter Notebook setup tutorial up until Conda is set up and activated.

With a Ubuntu server prepped and ready, install Jupyter Lab with the following command:

$ conda install -c conda-forge jupyterlab

Before we go any further, make sure you're tunneled into your server - we need to do this in order to launch notebooks, remember?:

$ ssh -L 8888:localhost:8888 myuser@your_server_ip

Start up the Jupyter Lab environment like this:

$ conda activate your_env$ jupyter lab

If everything went well, you should be greeted with a fancy Jupyter Lab loading screen and then thrown into the Jupyer Lab environment.

Upgrading to JupyterLab on Ubuntu

Home sweet home.

Things are looking good right off the bat. Without any added libraries, we've already beefed up our Jupyter Notebook workspace. The tree view is available, we can launch terminals, and don't forget: we can split screen by dragging snapping windows where we see fit.

Customizing Your Workspace

JupyterLab uses NodeJS to enable some of its cooler functionality and extensions. Go ahead and install Node:

$ cd /tmp$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -$ sudo apt-get install -y nodejs

Nice! Now we have all we need to go nuts with extensions. Here are the ones I recommend:

Status Bar


<!--kg-card-end: hr--><!--kg-card-begin: image-->

Upgrading to JupyterLab on Ubuntu

Keep an eye on your environment's vitals.

Repository foundhere. Installation steps:

$ pip install nbresuse$ jupyter serverextension enable --py nbresuse$ jupyter labextension install @jupyterlab/statusbar

Table of Contents

Upgrading to JupyterLab on Ubuntu

Auto-generate table of contents to help navigate and organize your notebooks.

Repository foundhere. Installation steps:

$ jupyter labextension install @jupyterlab/toc

Variable Inspector


<!--kg-card-end: hr--><!--kg-card-begin: image-->

Upgrading to JupyterLab on Ubuntu

Keep tabs on every variable used in your notebook and their respective values.

Repository foundhere. Installation steps:

$ jupyter labextension install @lckr/jupyterlab_variableinspector

Git Integration


<!--kg-card-end: hr--><!--kg-card-begin: image-->

Upgrading to JupyterLab on Ubuntu

A visual approach to version control.

Repository foundhere. Installation steps:

$ jupyter labextension install @jupyterlab/git$ pip install jupyterlab-git$ jupyter serverextension enable --py jupyterlab_git

Draw.io


<!--kg-card-end: hr--><!--kg-card-begin: image-->

Upgrading to JupyterLab on Ubuntu

Create Draw.io diagrams right from your notebook.

Repository foundhere. Installation steps:

$ jupyter labextension install jupyterlab-drawio

Additional Resources

You have everything you need to go nuts from here forward. INSTALL ALL THE EXTENSIONS!

If you're looking for more extension goodness, I'd start with theAwesome Jupyter repo on Github- there's a section specifically for JupyterLab.

If you're totally into JupyterLab now and want to join a gang, the community page can be foundhere.

Lastly, if you've gone totally off the deep end and already want to start creating extensions of your own, check out theextension documentation. That's all folks!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Technology for Badasses.

A community of degenerates obsessed with data science, data engineering, and analysis. Tackling major issues with unconventional tutorials. Openly pushing a pro-robot agenda.

More fromHackers And Slackers

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp