JupyterLab is a sought-after open-source web application that allows you to create and share documents containing live code, equations, visualizations, and explanatory text. It’s extensively used for various purposes such as data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
Before we dive into the installation process, let’s ensure the prerequisites:
Prerequisites
- A server running Fedora 39.
- Fresh OS install is recommended to prevent any potential issues.
- Access to the terminal to execute commands.
- A network connection or internet access to download the JupyterLab repository.
- A non-root sudo user account or access to the root user. It’s advisable to act as a non-root sudo user to prevent any system harm.
How to Install JupyterLab on Fedora 39
Step 1: Updating the Fedora System
Before starting the installation process, it’s important to update your Fedora system. This ensures all existing packages are up-to-date, using the command:
sudo dnf clean all sudo dnf update
Step 2: Installing Python
JupyterLab requires Python 3.3 or greater. Fedora 39 comes with Python 3 installed by default, but you can verify or install Python 3 using the following command:
sudo dnf install python3
Next, ensure pip, Python’s package installer, is up-to-date:
python3 -m pip install --user --upgrade pip
Step 3: Installing JupyterLab on Fedora 39
With pip, you can easily install JupyterLab:
pip install jupyterlab --user
To enable JupyterLab extensions and other Jupyter customizations, it’s recommended to also install Node.js:
sudo dnf install nodejs
Once installed, you can start JupyterLab by running:
jupyter lab
Step 4: Create a Virtual Environment (Optional but recommended)
To isolate project dependencies, it’s recommended to create a Python virtual environment:
python3 -m venv myenv source myenv/bin/activate
Step 5: Installing Essential JupyterLab Extensions
You can extend JupyterLab’s functionality with extensions, such as the GitHub extension:
jupyter labextension install @jupyterlab/github
Step 6: Configure JupyterLab
To customize JupyterLab settings according to your preferences, generate and customize the JupyterLab configuration file:
jupyter lab --generate-config
Then, edit ~/.jupyter/jupyter_lab_config.py
to customize JupyterLab settings according to your preferences.
To open port 8888 for JupyterLab, execute the command below. Then, start your JupyterLab on local IP 192.168.77.20, and Make sure to change the IP address:
sudo firewall-cmd --add-port=8888/tcp jupyter lab --ip 192.168.77.20
Finally, open your web browser and visit your local IP address with port 8888, http://192.168.77.20:8888/. You will be prompted with the JupyterLab login page.
Step 7: Secure JupyterLab
If you plan to access JupyterLab over a network, it’s important to secure it. Set up a password for JupyterLab by running:
jupyter notebook password
Congratulations! You have successfully installed JupyterLab. For additional help or useful information, we recommend you to check the official Jupyter website.
Speaking of services, if managing a VPS isn’t your expertise or you don’t have time to manage it, we recommend Shape.host services. They offer Linux SSD VPS. They are known for their reliable and efficient services.