diff --git a/src/jupyter_contrib_nbextensions/install.py b/src/jupyter_contrib_nbextensions/install.py index 09255f3e5..ede90344d 100644 --- a/src/jupyter_contrib_nbextensions/install.py +++ b/src/jupyter_contrib_nbextensions/install.py @@ -9,7 +9,10 @@ from jupyter_nbextensions_configurator.application import ( EnableJupyterNbextensionsConfiguratorApp, ) -from notebook.notebookapp import list_running_servers +try: + from notebook.notebookapp import list_running_servers +except ModuleNotFoundError: + from jupyter_server.serverapp import list_runnning_servers from traitlets.config import Config from traitlets.config.manager import BaseJSONConfigManager