Looking to install Jupyter Notebook on Rocky Linux 9?
If you’re new to Rocky Linux 9 or any Linux distributions, you might find it difficult to follow the installation steps.
Worry not.
In this guide, I’ll help you install Jupyter Notebook step-by-step.
What You’ll Need?
- Ensure that Rocky Linux 9 is properly installed and configured on your system (guide)
- Have access to the terminal/command line interface
- A stable internet connection
If you have the above prerequisites, you can proceed with the below steps for a seamless installation of Jupyter Notebook on Rocky Linux 9.
How to Install Jupyter Notebook on Rocky Linux 9: Step-by-Step Guide
Step 1: Update and Upgrade Packages
It is considered a good practice to update and upgrade the packages to keep them up-to-date with the latest security patches, bug fixes, and features.
Here are steps on how to update and upgrade packages on Rocky Linux 9:
- Open the terminal and enter the below command before installing Jupyter Notebook to ensure compatibility with packages:
sudo dnf update && upgrade
During the process, if you’re asked to choose Y/N, enter Y to provide additional storage and to continue the process.
Step 2: Install Python-pip3 Package
If you notice the screenshot in Step 1, you might have noticed that the python-pip3 package was installed prior.
If it is the same case with you, then you can safely skip this step. However, if you do not see the python-pip3 package installed, proceed with the steps below to install:
- On the terminal, enter the below command to install the Python Pip3 utility, which is the official package installer for Python 3:
sudo dnf install python3-pip
After you enter the command, ensure you provide the correct password, or else the installation terminates.
Once again, if you’re asked to choose Y/N, enter Y.
Step 3: Install Jupyter Notebook
With python-pip3 installed, you can now proceed with installing Jupyter Notebook.
Note: Check by entering the command pip3 –version and see if the output returns a version. If so, you can safely proceed with the steps below. However, if you don’t see the version output, you must repeat Step 2.
- On the terminal, enter the below command to install the Jupyter Notebook package:
Step 4: Configure Jupyter Notebook
Follow the below steps to configure your newly installed Jupyter Notebook:
- Start by creating a configuration file using the below command, and don’t wait for the output, as it doesn’t generate one:
jupyter notebook --generate-config
- After the configuration file is generated, the first thing to set is a password for security using the below command:
jupyter notebook password
While setting the password, ensure you enter the same password as the Enter password for Verify password.
If you have got it wrong, don’t worry; enter the command again to set the password.
Step 5: Run Jupyter Notebook
If you have all the above steps, you’re ready to use Jupyter Notebook.
While it can be accessed from the local host and port 8888, it is better to access it through the command.
- After setting a password, even though it isn’t mandatory, it is a good practice to restart the PC for the changes to appear.
- Once done, start by entering the below command on the terminal to open Jupyter Notebook on the browser:
jupyter notebook
- After the command runs, Jupyter Notebook is loaded on the browser. Now, enter the password you have set in Step 4 to log in and access the Jupyter dashboard.
- If you have entered the right credentials, you are displayed with the Dashboard.
- From the Dashboard, you can start working by pressing on New and selecting the file of your choice. For demonstration, we have created a text file.
Also Check Out: How to Install Hiri Email Client on Ubuntu 22.04 LTS
Conclusion
While this approach is the easiest, you can also install Jupyter Notebook through the Anaconda installer. However, we suggest you proceed with this approach as it doesn’t require the installation of multiple software.
If you have any issues with the above steps, ensure you’re entering the command right, as many accidentally type apt instead of dnf as a habit, forgetting they are on Rocky Linux 9.