Skip to content

PyTorch/torchvision version compatibility issue: operator torchvision::nms does not exist error #9

@AgatheZ

Description

@AgatheZ

Problem Description

When installing dependencies from requirements.txt, users encounter a PyTorch/torchvision compatibility error:

RuntimeError: operator torchvision::nms does not exist

The issue occurs because:

  1. requirements.txt specifies torchvision without version constraints
  2. pytorch_lightning is specified without version constraints
  3. This leads to pip installing incompatible versions of PyTorch and torchvision
  4. The torchvision::nms operator is not available in the installed torchvision version

Problematic versions that get installed:

  • PyTorch: 2.7.1 (very recent)
  • torchvision: 0.22.1 (incompatible with PyTorch 2.7.1)
  • numpy: 2.3.0 (incompatible with other dependencies)

Proposed Solution

Pin compatible versions

Update requirements.txt to specify compatible versions:

pytorch-lightning==2.5.1.post0
torch==2.1.2
torchvision==0.16.2
numpy==1.26.4

Metadata

Metadata

Assignees

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