Here's what I've done:
Now, in my notebook, the map widget does not display the first time I run a cell. For example, when I run the following cell the first time:
from arcgis.gis import GIS my_gis = GIS() my_gis.map()
The map widget is not displayed. If I run the cell again, then the map widget is displayed.