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 1
1
from enum import Enum
2
2
from importlib import import_module
3
+ import sys
3
4
4
5
5
6
class Env (Enum ):
@@ -37,7 +38,7 @@ def find_env():
37
38
ENVIRONMENT = find_env ()
38
39
39
40
if 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 :
41
42
try :
42
43
import imjoy_jupyter_extension
43
44
except :
@@ -47,15 +48,14 @@ def find_env():
47
48
import_module ("imjoy-jupyterlab-extension" )
48
49
except :
49
50
if ENVIRONMENT is Env .JUPYTERLITE :
50
- print ('imjoy-jupyterlab-extension is required' )
51
51
raise RuntimeError ('imjoy-jupyterlab-extension is required. Install the package and refresh page.' )
52
- else :
52
+ elif sys . version_info . minor > 7 :
53
53
raise RuntimeError ('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.' )
54
54
55
55
try :
56
56
import imjoy_elfinder
57
57
except :
58
58
if ENVIRONMENT is Env .JUPYTERLITE :
59
59
raise RuntimeError ('imjoy-elfinder is required. Install the package and refresh page.' )
60
- else :
60
+ elif sys . version_info . minor > 7 :
61
61
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