Skip to content

rules_python 1.7.0 and jupyterlab #3523

@gfrankliu

Description

@gfrankliu

Since I upgraded my rules_python from 1.4.1 to 1.7.0, jupyterlab stops working. bazel run gives "No module named ipykernel_launcher" even though I have requirement("ipykernel"), in deps.

I see this in the 1.7.0 changelog:

(bootstrap) For [--bootstrap_impl=system_python](https://rules-python.readthedocs.io/en/latest/api/rules_python/python/config_settings/index.html#bootstrap_impl), PYTHONPATH is no longer used to add import paths. The sys.path order has changed from [app paths, stdlib, runtime site-packages] to [stdlib, app paths, runtime site-packages].

I suspect this is the root cause. Jupyter spawns completely new, independent OS processes (Kernels). I assume it replies on PYTHONPATH from rules_python to "find" the ipykernel module.

Is there a quick workaround to get jupyterlab working again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions