INNER CODE UNIT · Python

is_notebook_compatible

buckaroo-data/buckaroo · buckaroo/__init__.py:19

def is_notebook_compatible():
    jupyter_env = determine_jupter_env()
    if jupyter_env == "jupyter-notebook":
        try:
            import notebook
            return notebook.version_info[0] >= 6
        except:
            pass
        return False
    else:
        return True

def warn_on_incompatible():
    if not is_notebook_compatible():
        import notebook
        print("Buckaroo is compatible with jupyter notebook > 6, or jupyterlab >3.6.0")
        print("You seem to be executing this in jupyter notebook version %r" % str(notebook.__version__))
        print("You can upgrade to notebook 7 by running 'pip install --upgrade notebook'")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…