How to Install JupyterLab on Ubuntu: A Step-by-Step Guide
JupyterLab gives you a web-based, interactive coding environment on Ubuntu. It is widely used for data science and machine learning, and it works just as well for general Python scripting, teaching, and quick experiments. You run it on your own machine and use it through your browser.
Install pip with sudo apt install python3-pip, create a virtual environment using python3 -m venv jupyter-env, activate it with source jupyter-env/bin/activate, then install JupyterLab by running pip install jupyterlab. Start it with jupyter lab.
JupyterLab is the current user interface for Project Jupyter. It replaces the older classic Notebook interface. In one browser tab you can write and run code in notebooks, edit plain text and Markdown files, open a terminal, browse your project files, and view output such as tables and charts. The panels sit side by side, so you can keep a notebook next to a data file or a terminal.
This guide covers installing JupyterLab version 4.0 or later on Ubuntu. Before you start, make sure you have the following:
- A supported Ubuntu release. Any current LTS release, such as 22.04 or 24.04, works.
- Python 3. Ubuntu ships with it, but check that it is installed and note which version you have. JupyterLab 4 needs a reasonably recent Python 3, so very old releases may not work.
- pip, the Python package installer. It is not always installed by default, so you may need to add it.
- A user account with sudo rights. You need this to install system packages such as pip and the Python venv module.
- An internet connection, because the packages are downloaded when you install.
One thing to know about newer Ubuntu releases: from 23.04 onward, including 24.04, Ubuntu marks the system Python as “externally managed.” If you try to install packages into it with pip, you get an error instead of an install. This is intentional. It stops pip from overwriting packages that Ubuntu itself depends on. The usual fix is to install JupyterLab inside a Python virtual environment. That keeps it separate from the system Python, and you can delete it later without affecting anything else.
Once JupyterLab is installed and started, it runs a local server, by default on port 8888, and opens in your default browser. If you are working on a remote server or a machine with no desktop, you will need to open the address yourself or forward the port. Do not expose the server to the internet without a password or token, because anyone who can reach it can run code as your user.
With JupyterLab in place, you can try out code, plot and inspect data, and share notebooks with colleagues. Notebooks are plain files, so they are easy to keep in version control or send to someone else.
Was this guide helpful?
0% of readers found this helpful (1 votes)
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!