The first step is to install cartopy on your system. Since cartopy assumes a large number of dependencies, this recipe assumes that you have the Anaconda distribution installed. This being the case, simply run the following statement from the command line to install cartopy:
conda install -c conda-forge cartopy
After the installation finishes, start Jupyter and run the following three commands in an execution cell:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt