The tech space is inundated with discussions about machine learning ops (MLOps), strict data regulations, and adherence to complex data pipelines. It's sometimes easy to forget that whimsically playing with code snippets, libraries, and data sets is essential to the success of data science projects. In fact, data exploration and feature engineering can take as much time as model development, if not more.
Before Jupyter Notebooks, data scientists wrote long (usually messy) scripts specifically for data exploration and transformation. Perhaps one function in the script was responsible for pumping out descriptive statistics on a data set, while another performed different transformations and plotted the new distribution.
Every time someone wanted a specific plot or statistic, the data scientist ran the entire script and modified function calls as needed. However, if the code was not neatly organized into functions, the data scientist ran the whole script and watched helplessly as multiple plots were generated onscreen.
Enter JupyterLab, a server-client application for interactive coding in Python, Julia, R, and more. JupyterLab provides an environment for developers to create Jupyter Notebooks and scripts. The notebooks are a solution for running organized code snippets (or cells) that operate independently of each other and whose output appears directly below the cell.
This guide demonstrates how to install, execute, and update JupyterLab on Red Hat Enterprise Linux (RHEL), CentOS Stream, or Fedora.
Choose a language
Before installing JupyterLab, you must decide on the programming language you intend to use and whether your workloads require graphics processing units (GPUs). JupyterLab supports over 100 programming languages, including Scala, Matlab, and Java.
[ Download now: A sysadmin's guide to Bash scripting. ]
Because Python is popular among data scientists, sysadmins, and power users alike, I'll use it in this article for demonstration.
Install JupyterLab
JupyterLab requires Python 3.3 or greater. Python's designated package manager, pip
, makes it easy to install JupyterLab. Begin with dnf
:
$ sudo dnf update
$ sudo dnf install epel-release
$ sudo dnf install python3
$ sudo dnf install python3-pip
After installation, verify that Python and pip
are accessible:
$ python3 –version
$ python3 -m pip install --user --upgrade pip
JupyterLab sets up a web server to allow users to create multiple notebooks and scripts. If you're using a virtualenv in Python, activate the environment before installing:
$ python3 -m pip install --user jupyterlab
If you require GPU support, install the CUDA driver and TensorFlow.
Run JupyterLab
Launch JupyterLab with the --no-browser
option to keep Jupyter from launching a local user interface (UI) and the --port
option with a port number as input (the default port number is 8888):
$ jupyter-lab --no-browser –-port=<port_number>

JupyterLab sets up a web server and outputs a URL to access the UI. Password protect your JupyterLab server by generating and modifying a Jupyter config file:
$ jupyter-lab –generate-config
$ jupyter-lab password
[ Free cheat sheet: Get a list of Linux utilities and commands for managing servers and networks. ]
After launching JuptyerLab, access the UI from a remote machine over HTTP or with SSH port forwarding. To access JupyterLab through a web browser, you must open the port to HTTP traffic using firewall-cmd
:
$ sudo firewall-cmd --add-service http --permanent
$ sudo firewall-cmd –reload
Now open a browser on a remote machine and navigate to your server's IP address or hostname in the place of localhost in the URL Jupyter provides. For instance, if your server is located at 10.1.2.34, the URL of JupyterLab is 10.1.2.34:5678/lab.
If you don't want to open a firewall port for HTTP traffic, you can instead use SSH port forwarding. From a remote machine, SSH to your server, routing the JupiterLab port (5678 in this example) to some port on your local machine:
$ ssh -fL 8080:10.1.2.34:5678 user@10.1.2.34
Alternately, you can access JupyterLab directly on the local server by launching a browser and navigating to localhost:5678 (with 5678 being the port where you launched JupyterLab).

Files and notebooks are stored in the working directory where JupyterLab is launched (that is, on the server running JupyterLab).
Try JupyterLab
A good Python IDE can simplify programming, and Jupyter Notebooks makes running your code amazingly versatile. Install JupyterLab and run your Python code as you've never run it before.
About the author
Nicole Lama is a first-generation Panamanian-American with a bachelor's in biomedical sciences and a master's in bioinformatics and computational biology. Since 2015, she has worked with academics, tech startups, and Fortune 500 companies to help meet their data extraction, transformation, mobilization, storage, analytics, and visualization needs. She specializes in Python, machine learning, and open source technology.
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit