Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix imjoy_jupyterlab_extension module detection #689

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions itkwidgets/integrations/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ def find_env():
else:
try:
import_module("imjoy-jupyterlab-extension")
except:
if ENVIRONMENT is Env.JUPYTERLITE:
raise RuntimeError('imjoy-jupyterlab-extension is required. Install the package and refresh page.')
elif sys.version_info.minor > 7:
raise RuntimeError('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.')
except ModuleNotFoundError:
try:
import_module("imjoy_jupyterlab_extension")
except ModuleNotFoundError:
if ENVIRONMENT is Env.JUPYTERLITE:
raise RuntimeError('imjoy-jupyterlab-extension is required. Install the package and refresh page.')
elif sys.version_info.minor > 7:
raise RuntimeError('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.')

try:
import imjoy_elfinder
Expand Down