Skip to content

Upgrade pip before installing torch in scbutterfly - #64

Merged
rcannood merged 1 commit into
mainfrom
fix/scbutterfly-pip-index
Aug 14, 2026
Merged

Upgrade pip before installing torch in scbutterfly#64
rcannood merged 1 commit into
mainfrom
fix/scbutterfly-pip-index

Conversation

@rcannood

Copy link
Copy Markdown
Member

Describe your changes

Both scButterfly components stopped building, which is the whole of the current CI failure on main -- every other component is green in both Build and Test.

The failing line is the torch install:

pip install --no-cache-dir torch==1.13.1 torchvision==0.14.1 --index-url https://download.pytorch.org/whl/cu117

Nothing about it changed; typing_extensions did. The chain:

  1. --index-url replaces PyPI, so every transitive dependency has to come off the PyTorch index too.
  2. torch 1.13.1 needs typing-extensions. The PyTorch index links back to the PyPI-hosted typing_extensions-4.15.0-py3-none-any.whl.
  3. The pip shipped in python:3.9 predates PEP 503 name normalisation in that check, so it discards the wheel: has inconsistent Name: expected 'typing-extensions', but metadata has 'typing_extensions'.
  4. It falls back to the sdist. typing_extensions 4.15 builds with flit_core<4,>=3.11, which is not on the PyTorch index, and the build-dependency install inherits the same --index-url. ERROR: No matching distribution found for flit_core<4,>=3.11.

So it is a stale-pip bug that a third-party release tripped, not a change on our side and not the base images -- these two components are the only ones still on python:3.9 rather than openproblems/base_pytorch_nvidia:1.

Upgrading pip first fixes it: modern pip accepts the wheel, never reaches the sdist, and never needs flit_core.

Verified locally: both images build, and viash test passes for scbutterfly_train and scbutterfly_predict.

Leaving the python:3.9 + torch 1.13.1 stack alone here. Moving scButterfly onto base_pytorch_nvidia:1 means Python 3.12, torch 2.11 and numpy 2, against a component currently pinned to numpy==1.23.5 / scanpy==1.9.3 / anndata==0.8.0 / episcanpy==0.3.2 -- worth doing, but not as the fix that unbreaks CI.

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

@rcannood
rcannood merged commit bde9dee into main Aug 14, 2026
3 checks passed
@rcannood
rcannood deleted the fix/scbutterfly-pip-index branch August 14, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant