Skip to content

torchcodec default version mismatch with torch causes installation error when using uv #51

@kento2247

Description

@kento2247

When installing torchcodec via uv, the default resolved version is torchcodec==0.9, which targets PyTorch 2.9.
This causes installation or runtime errors if the project is using an older PyTorch version.

In my case, the error occurs with the following steps:

uv add https://github.com/facebookresearch/sam-audio.git

This pulls in torchcodec==0.9 by default, which is incompatible with my installed PyTorch version.

A workaround is to explicitly install a torch-compatible version of torchcodec:

uv add torchcodec==<version compatible with installed torch>

This resolves the issue.
Is there a better or recommended way to handle this version compatibility?

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