Skip to content

Poetry Fails to Install/Update more-itertools on macOS #37

Description

@rjmoggach

When running poetry self add poetry-plugin-shell, Poetry attempts to update more-itertools (from 10.5.0 -> 10.6.0), but fails with the error:

Command '['/opt/homebrew/Cellar/poetry/2.0.1/libexec/bin/python', 
'/opt/homebrew/Cellar/poetry/2.0.1/libexec/lib/python3.13/site-packages/virtualenv/seed/wheels/embed/pip-24.3.1-py3-none-any.whl/pip', 
'uninstall', 'more-itertools', '-y']' returned non-zero exit status 1.

The error indicates that more-itertools is not installed, yet Poetry still tries to uninstall it, leading to a failure.

Expected Behavior

Poetry should correctly detect whether more-itertools is installed and handle the update properly. If it’s not installed, it should install it rather than attempting an uninstall.

Environment Details

  • OS: macOS (Apple Silicon)
  • Python Version: 3.13.1 (Installed via Homebrew)
  • Poetry Version: 2.0.1
  • Package Manager: Homebrew
  • Virtualenv: Poetry-managed

Steps to Reproduce

brew install python@3.13
curl -sSL https://install.python-poetry.org | python3 -
poetry self add poetry-plugin-shell

Suggested Fix

  • Poetry should check if a package is installed before attempting to uninstall it.
  • Ensure Poetry respects system-installed packages and does not conflict with Homebrew-managed dependencies.

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