How to install JupyterLab on MacBook Air M1?

I originally encountered a bit of problem installing JupyterLab on my new MacBook Air M1. Here is what eventually worked for me to successfully install JupyterLab on MacBook Air M1.

Install pip with python 3

Run the following in terminal:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

With my environment, I got a few warnings about the PATH not correctly configured. So I needed to update the PATH in my ~/.zprofile. I added the following line to this file:

export PATH="/Users/<yourusername>/Library/Python/3.9/bin:$PATH"

Note that I am using Python 3.9 here.

After editing the file, let’s make sure it’s working. Back to terminal:

source ~/.zprofile

Install JupyterLab using pipenv

Now the rest is simple. We can now install JupyterLab using pipenv.

pipenv install jupyterlab

Start using JupyterLab

We can now use JupyterLab wherever we like. In the terminal, go to the target work directly where we would like to start our work in. First we start the virtual environment:

pipenv shell

Start JupyterLab:

jupyter lab

Reference

https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#pipenv

Leave a ReplyCancel reply