JupyterLab
You can set up your assignment to provide your students with the JupyterLab IDE.
Note
Code Playback does not work with JupyterLab Notebooks.
To view a timeline of events in a notebook, see Collaboration and Timeline below.
Using JupyterLab in Codio
If you plan to use JupyterLab and optionally nbgrader, you must use a stack configured to support them. As these items are often difficult to configure, we recommend that you select the JupyterLab stack from our list of Certified Stacks.
For information about grading notebook assignments, see nbgrader.
Note
Notebook files are only supported in the root (/home/codio/workspace or ~/workspace) folder.
Opening JupyterLab
There are multiple ways to provide your students with access to JupyterLab.
The following are a few of the possibilities.
- Modify the Preview menu so that students can access the Jupyter server through the menu and open it in Codio or in a new browser tab.
To customize the Preview button, modify this section of the .codio file:
{ // Preview button configuration "preview": { "JupyterLab": "https://{{domain3000}}/" } }
- Use guides to create a layout that automatically opens a pane containing JupyterLab and a particular Notebook file. The example below shows a 2-Panel layout.
Create a 2-Panel Layout.
Add a tab and select the “JupyterLab” type.
Enter the name of your file into the Filename field or drag it from the file tree.
You can change the guide settings to Collapsed on Start and the Jupyter pane will open with the Guides collapsed.
If you don’t use Guides, consider creating a README.md file with instructions on accessing JupyterLab. When there are no guides, the README.md will auto-open for students. You can tell students to click on the file in the file tree if you haven’t configured another way to open it.
JupyterLab Extensions
The following two features require JupyterLab. The Codio Certified Jupyter stacks based on Ubuntu 22.04 all come with JupyterLab pre-installed, so you can access these extension features immediately after opening JupyterLab.
If you are using a custom stack, you can check if JupyterLab is installed by running jupyter --version in the terminal. If it is not installed, you will not be able to use these features.
Virtual Coach and JupyterLab
An extension will allow Virtual Coach to access the contents of your Jupyter Notebook and detect errors when running Jupyter cells. This extension is already installed in all the Codio Certified Jupyter stacks. You can add the extension if you have your own custom Jupyter stack.
Use the Tools > Install Software (more information) menu item to install the Jupyter Codio Extension.
After you have completed installing the software you will need to create a new stack or a new stack version to provide this for your students.
Collaboration and Timeline
Important
You must have JupyterLab 4.4 or greater to use the Jupyter Collaboration Extension.
This extension will allow multiple students to collaborate on a single Jupyter Notebook. You can set up groups using the Pair Programming feature to facilitate notebook sharing; note that this extension does not support the Driver/Navigator and Shared Focus functionality (described in the same section).
Use the Tools > Install Software (more information) menu item to install the Jupyter Collaboration Extension.
After you have completed installing the software you will need to create a new stack or a new stack version to provide this for your students.
For more information about the Jupyter Collaboration Extension, see the official documentation. This extension also provides a timeline of events in a Jupyter Notebook; learn more in this blog post about timeline viewing.