File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11from enum import Enum
22from importlib import import_module
3+ import sys
34
45
56class Env (Enum ):
@@ -37,7 +38,7 @@ def find_env():
3738ENVIRONMENT = find_env ()
3839
3940if ENVIRONMENT is not Env .COLAB :
40- if ENVIRONMENT is Env .JUPYTER_NOTEBOOK :
41+ if ENVIRONMENT is Env .JUPYTER_NOTEBOOK and sys . version_info . minor > 7 :
4142 try :
4243 import imjoy_jupyter_extension
4344 except :
@@ -47,15 +48,14 @@ def find_env():
4748 import_module ("imjoy-jupyterlab-extension" )
4849 except :
4950 if ENVIRONMENT is Env .JUPYTERLITE :
50- print ('imjoy-jupyterlab-extension is required' )
5151 raise RuntimeError ('imjoy-jupyterlab-extension is required. Install the package and refresh page.' )
52- else :
52+ elif sys . version_info . minor > 7 :
5353 raise RuntimeError ('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.' )
5454
5555try :
5656 import imjoy_elfinder
5757except :
5858 if ENVIRONMENT is Env .JUPYTERLITE :
5959 raise RuntimeError ('imjoy-elfinder is required. Install the package and refresh page.' )
60- else :
60+ elif sys . version_info . minor > 7 :
6161 raise RuntimeError ('imjoy-elfinder is required. `pip install imjoy-elfinder` and refresh page.' )
You can’t perform that action at this time.
0 commit comments