Hello Peter,
If you are running the notebook outside of ArcGIS Online, you can use the information that Tyler provided above to install cartopy in a local Python environment.
If you are working within ArcGIS Online, when you open a notebook, the Python environment supporting the notebook editor experience already includes conda, so you do not need to install it on your own. However, as Tyler mentioned, the cartopy library is not included by default. You would need to install the library before you can import and use it in ArcGIS Online.
I just ran the command below in a notebook in ArcGIS Online, and I was able to import cartopy with the library installed.
conda install -c conda-forge cartopy
Please note that it might take a couple of minutes for this command to finish running, and you would need to run this command to install cartopy every time you start a new notebook session. For example, say you saved and closed the notebook for the day, and when you open it the next morning, you would need to run the command again.
Thank you,
Lingtao | Product Engineer for ArcGIS Notebooks