Skip to content

ipywidgets 8.x fails to install on Windows via Poetry due to path length, but 7.7.0 works #4013

@enricostragiotti

Description

@enricostragiotti

Description

Installing ipywidgets version 8.1.8 (and likely other 8.x and >7.7.0 releases) on Windows 11 using Poetry (version 2.2.1, Python 3.10.11) results in a failure during dependency installation due to extremely long/nested file paths generated by bundled labextension files. The problematic file is:

share\jupyter\labextensions\@jupyter-widgets\jupyterlab-manager\static\vendors-node_modules_d3-color_src_color_js-node_modules_d3-format_src_defaultLocale_js-node_m-09b215.2643c43f22ad111f4f82.js

The error is:

FileNotFoundError
[Errno 2] No such file or directory: '...\@jupyter-widgets\jupyterlab-manager\static\vendors-node_modules_d3-color_src_color_js-node_modules_d3-format_src_defaultLocale_js-node_m-09b215.2643c43f22ad111f4f82.js'

This is due to Windows default path length restrictions (260 characters). The workaround is to pin ipywidgets==7.7.0, which installs jupyterlab-widget v1.1.11 and works correctly. For users in managed/corporate environments, enabling long-path support is often not feasible without special IT approval.

Reproduce

Environment:

  • Windows 11 (default, no long-path enabled)
  • Poetry v2.2.1
  • Python 3.10.11

Steps:

  1. Create a new Python environment/project (e. g., with Poetry)
  2. Run poetry add ipywidgets==8.1.8
  3. Observe installation failure with path length error on the above file
  4. Run poetry add ipywidgets==7.7.0 and observe successful install

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions