[Build] Support to use loosen version when failed to install python packages (#14013)

Why I did it
[Build] Support to use loosen version when failed to install python packages
It is to fix the issue #14012

How I did it
Try to use the installation command without constraint

How to verify it
This commit is contained in:
xumia 2023-03-03 15:21:10 +08:00 committed by mssonicbld
parent 1757f53290
commit b8fe3c2989

View File

@ -217,6 +217,11 @@ run_pip_command()
$REAL_COMMAND "${parameters[@]}"
local result=$?
if [ "$result" != 0 ]; then
echo "Failed to run the command with constraint, try to install with the original command" 1>&2
$REAL_COMMAND "$@"
result=$?
fi
rm $tmp_version_file
return $result
}