"Failed building wheel for regex" while installing pip package

WSL is unrelated to the issue, this is a fairly standard error.

Ensure the following packages are installed. Install them using apt-get install packagename. The issue this particular time was resolved by installing python-dev.

python3
python3-pip
ipython3
build-essential
python-dev
python3-dev

As a single command:

sudo apt-get install python3 python3-pip ipython3 build-essential python-dev python3-dev