diff --git a/src/taggingbackends/explorer.py b/src/taggingbackends/explorer.py index 6ce6cb49d6c91fcfcb78f0f46ae2d1ca188e70f4..b72563774d59095375e214ef59c25a2df08c3daa 100644 --- a/src/taggingbackends/explorer.py +++ b/src/taggingbackends/explorer.py @@ -11,22 +11,26 @@ import tempfile from collections import defaultdict JULIA_PROJECT = os.environ.get('JULIA_PROJECT', '') +DISABLE_JULIA = os.environ.get('DISABLE_JULIA', '') try: from julia import Julia except: - logging.warning(f"PyCall not found in JULIA_PROJECT={JULIA_PROJECT}; \ + if not isempty(DISABLE_JULIA): + logging.warning(f"PyCall not found in JULIA_PROJECT={JULIA_PROJECT}; \ please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") else: try: Julia(compiled_modules=False) except: - logging.warning("Failed to set PyCall with compiled_modules=False") + if not isempty(DISABLE_JULIA): + logging.warning("Failed to set PyCall with compiled_modules=False") try: from julia import TaggingBackends from julia import PlanarLarvae - except ImportError: - logging.warning(f"TaggingBackends not found in JULIA_PROJECT={JULIA_PROJECT}; \ + except: + if not isempty(DISABLE_JULIA): + logging.warning(f"TaggingBackends not found in JULIA_PROJECT={JULIA_PROJECT}; \ please see https://gitlab.pasteur.fr/nyx/TaggingBackends#recommended-installation") def getlogger(name):