From 2cb3bba65863271393f4bcb473da9da66f4aebbd Mon Sep 17 00:00:00 2001 From: Darren <46543723+dsynkd@users.noreply.github.com> Date: Mon, 2 Mar 2026 10:57:29 -0800 Subject: [PATCH] [bugfix]: fix a bug where collect_env was not running properly... (#1145) --- collect_env.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collect_env.py b/collect_env.py index 44082ff2f..59286f2b3 100644 --- a/collect_env.py +++ b/collect_env.py @@ -9,11 +9,12 @@ import datetime import locale import os import re +import shutil import subprocess import sys -# Unlike the rest of the PyTorch this file must be python2 compliant. -# This script outputs relevant system environment info -# Run it with `python collect_env.py` or `python -m torch.utils.collect_env` +# This script outputs relevant system environment info. +# Run it with: python collect_env.py +# Requires Python 3.10+ (matches fastvideo); uses shutil.which (Python 3.3+). from collections import namedtuple from fastvideo.envs import environment_variables @@ -495,8 +496,7 @@ def get_pip_packages(run_lambda, patterns=None): if pip_available: cmd = [sys.executable, '-mpip', 'list', '--format=freeze'] - elif os.environ.get("UV") is not None: - print("uv is set") + elif shutil.which("uv") is not None: cmd = ["uv", "pip", "list", "--format=freeze"] else: raise RuntimeError(