This is based on Method 2 in https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/
First, you need to install Python 3.7 (you will currently have Python 3.5.2):
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7
You now have two different versions of Python 3!
$ python3 --version
# Outputs 3.5.2
$ python3.7 --version
# Outputs 3.7
So you need to use pipenv but tell it to use Python 3.7 instead.
In a brand new folder do this:
pipenv --python=python3.7 install jupyterlab
Now you should be able to continue using the regular commands in that folder, e.g.
pipenv install altair
pipennv install pandas
pipenv run jupyter lab
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
sudo tar xzf Python-3.7.4.tgz
cd Python-3.7.4
sudo ./configure
sudo make
sudo make install