From a890e36a36320fd9a9e6042090b227e8aad9e6e8 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 19 Oct 2021 10:47:09 +0300 Subject: [PATCH] Fix PY2.7 support for pytorch --- clearml_agent/helper/package/pytorch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clearml_agent/helper/package/pytorch.py b/clearml_agent/helper/package/pytorch.py index 7b5a277..6b8b03a 100644 --- a/clearml_agent/helper/package/pytorch.py +++ b/clearml_agent/helper/package/pytorch.py @@ -263,6 +263,9 @@ class PytorchRequirement(SimpleSubstitution): continue if len(parts) < 5 or platform_wheel not in parts[4]: continue + # yes this is for linux python 2.7 support, this is the only python 2.7 we support... + if py_ver and py_ver[0] == '2' and len(parts) > 3 and not parts[3].endswith('u'): + continue # update the closest matched version (from above) if not closest_v: closest_v = v