How to install cartopy on Ubuntu

First, you need to install libproj (which is a dependency of cartopy) using

sudo apt -y install libproj-dev

After that, install cartopy using

sudo pip3 install cartopy