There might be some instances where you want to download your notebooks or workspace, or refresh your workspace to start from scratch. This topic contains instructions for managing your lab notebooks. Some courses host them on different platforms, so please select the one applicable to the lab you’re working on.
Coursera Labs
Our courses on Coursera either use a Jupyter Noteebok environment, which looks like this:
Or, they use a Jupyter Lab environment, which looks like this (there’s a panel on the left side):
Note: Please make sure you know which environment is being used in the course you are taking, as the instructions below would vary.
Downloading your Notebook
In case you need to download your notebook for troubleshooting or running in your local environment, you can follow these simple steps:
Coursera Jupyter Notebook Environment
- From the Menu Bar of the notebook you are working on, click
File → Save and Checkpoint(orFile → Save Notebook) to first save your progress. - Click
File → Download as → Notebook (.ipynb)(orFile → Download). This should start downloading the file into your local machine.
Coursera Jupyter Lab Environment
- First, make sure you have the notebook tab open. Second, click anywhere in the notebook.
- From the Menu Bar, click
File → Save Notebook. - On the left hand panel, right click on the notebook file you want to download, select
Download. This should start downloading the file into your local machine.
Downloading your Workspace
In case you need to download your entire workspace or some files for troubleshooting, or running in your local environment, you can follow these simple steps:
- From the Menu Bar, click
File → Save and Checkpoint(or,File → Save Notebook) to first save your progress. - On the top right, click
Lab Files, this will open a panel. - Now, you can either download the entire workspace by clicking
Download all filesor you can select the files you want to download.
Note: The best way to download the supporting files for the notebook(s) is the Downloading your Workspace option.
Refreshing your Workspace
This will come in handy whenever you need to start from scratch, fetch the latest version of the assignment, or run into a 404 error.
Coursera Jupyter Notebook Environment
- Open the notebook from the classroom.
- After the notebook opens up, click
File → Open... - When your workspace opens, tick the check box before your notebook file. After it is selected, press
Shutdown. The icon beside the filename should turn from green to gray. - Tick the checkbox again and this time choose
Renameand enter any filename other than the original. For example,C1_W1_Assignment.ipynb(original) →C1_W1_Assignment_v2.ipynb - (Optional) Tick the checkbox of any other file that you want to get a fresh copy of (e.g. dataset files that you might have manipulated irreversibly). Then click
Delete. You can also opt toRenameorDownloadeach file individually in case you want to keep them before deleting. - Click on the
Helpbutton on the top right of the page. - Click the
Get latest versionbutton. - Click the
Update Labbutton. The page will refresh and you should now see the latest version of the notebook.
Coursera Jupyter Lab Environment
- Open the notebook from the classroom.
- Once your workspace opens, in the left hand panel, right click on the notebook file and select
Rename. Enter any filename other than the original. For example,C1_W1_Assignment.ipynb(original) →C1_W1_Assignment_v2.ipynb - (Optional) For any other file that you want to get a fresh copy of (e.g. dataset files that you might have manipulated irreversibly), right click on it and select
Delete. You can also opt toRenameorDownloadeach file individually in case you want to keep them before deleting. - Click on the
Helpbutton on the top right of the page. - Click the
Get latest versionbutton. - Click the
Update Labbutton. The page will refresh and you should now see the latest version of the notebook.
DeepLearning.AI’s Learning Platform
Downloading your Workspace
To download a complete backup of your current workspace to your local machine, please follow these steps:
-
Click the
(Save) icon located in the top-left corner of your notebook to ensure your latest changes are saved.
-
Check for a separate
Savebutton on the top-left of your notebook screen. If you see it, click it. (If you do not see this button, simply proceed to the next step).
-
Click the
+button to add a new cell to your notebook.
-
Copy, paste, and run the following command in the new cell to compress your workspace into a single archive:
!tar -czvf my_files.tar.gz .Wait for the cell’s execution to finish before moving on to the next step.
-
Option 1: Direct Download (Jupyter Lab)
If you are working within a Jupyter Lab interface, the simplest way to retrieve your file is through the file browser.
- Locate the Side Panel on the left-hand side of your notebook screen.
- Find the file named
my_files.tar.gzin your workspace directory. - Right-click on the file and select
Downloadfrom the menu.
Option 2: Scripted Download Link (Jupyter Notebook)
If you don’t see the option to open the side panel, you are likely working in a Jupyter Notebook environment. In this case, you can generate a direct download link by running a small script inside your notebook.
- Add a new cell, then copy, paste, and run the following code:
import base64 from IPython.display import HTML def download_tarball(filename): with open(filename, "rb") as f: b64 = base64.b64encode(f.read()).decode() html_str = f'<a download="{filename}" href="data:application/gzip;base64,{b64}" target="_blank"><b>Click here to download {filename}</b></a>' return HTML(html_str) download_tarball('my_files.tar.gz')Once the code finishes executing, a clickable link will appear in the cell’s output. Simply click “Click here to download my_files.tar.gz” to save the packaged workspace to your local system.
-
To unpack these files on your local machine, open your terminal and ensure you are in the same directory where the file was downloaded. Then, run the following command to extract the contents into a new folder named
my_files:mkdir -p my_files && tar -xzvf my_files.tar.gz -C my_files
Refreshing your Workspace
This process is useful if you need to start from scratch or fetch the latest version of a notebook.
WARNING: The following steps will reset ALL files in your workspace. Any changes you have made will be permanently lost. If you want to keep a copy of your current work/files, please follow the Downloading Your Workspace instructions above before proceeding.
-
Click the
(Save) icon located in the top-left corner of your notebook.
-
Check for a separate
Savebutton on the top-left of your notebook screen. If you see it, click it. (If you do not see this button, simply proceed to the next step).
-
Click the three vertical dots (
⋮) icon in the top-right corner of your notebook screen. When the drop-down menu opens, selectRestore Original Version.
-
A confirmation pop-up will appear on your screen. Click the
Restore Originalbutton to confirm. -
The page should automatically reload. If it does not, manually refresh your browser page to finalize the workspace reset.
Google Colab
Downloading your Notebook
If clicking the assignment link goes to a URL starting with https://colab.research.google.com, you can download your notebook by simply clicking File → Download → Download.ipynb.
Vocareum / AWS Sagemaker
Downloading your Notebook
You can either right-click on the file in the File Explorer, or click File in the Menu Bar. Both should have a Download option:
-
Method 1: Right-click the filename in the File Explorer:
-
Method 2: Use the
Filemenu:






