Step 1: Install Homebrew if not already installed (Homebrew is a package manager for MacOS)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2: Install Python
brew install python
Step 3: Verify Python installation
python3 --version
You should get something like this below:

Step 4: Install Jupyter Lab using pip command
pip install jupyterlab
Step 5: Verify installation
jupyter lab --version

Step 6: launch Jupyter Notebook
jupyter lab

Jupyter notebook launches on a webpage, on localhost port 8888 or 8889 based on available ports ie. http://localhost:8888/lab

more info- you can add the packages you require in the jupyter lab using pip command: ie Below packages are installed in the Jupiter lab
pip install oci pandas numpy matplotlib scikit-learn
Other cmds;
If you want to list the Jupyter lab sessions running:
juypter lab list

To close a session,close the terminal (ctrl+c) running the jupyter session or open another terminal and close the session using the below cmd
jupyter lab stop 8889
In my case above 8889 was my port number.
One thought on “How to install a Jupyter notebook on a Mac book”