diff --git a/itkwidgets/integrations/environment.py b/itkwidgets/integrations/environment.py index 990b56d4..4132592a 100644 --- a/itkwidgets/integrations/environment.py +++ b/itkwidgets/integrations/environment.py @@ -18,14 +18,14 @@ def find_env(): except: try: from IPython import get_ipython + if 'studio-lab' in get_ipython().starting_dir: + return Env.SAGEMAKER parent_header = get_ipython().parent_header username = parent_header['header']['username'] if username == '': return Env.JUPYTERLAB elif username == 'username': return Env.JUPYTER_NOTEBOOK - else: - return Env.SAGEMAKER except AttributeError: try: import js