From 2df2aa01584fb2a26112c60f0a16869e233cb7ee Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 10 Aug 2021 13:50:08 +1000 Subject: [PATCH] install_pip: don't fail when not installed On some platforms, "python -m pip" isn't available. Currently this is run undconditionally from the "get_versions" function; remove the call. Change-Id: I91d6c66d055f02fa7b4368593b629933f82d8117 --- tools/install_pip.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 0082e9f73c..eb0f6eba48 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -46,15 +46,13 @@ echo "Distro: $DISTRO" function get_versions { # FIXME(dhellmann): Deal with multiple python versions here? This # is just used for reporting, so maybe not? - PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true) + PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || which pip3 2>/dev/null || true) if [[ -n $PIP ]]; then PIP_VERSION=$($PIP --version | awk '{ print $2}') echo "pip: $PIP_VERSION" else echo "pip: Not Installed" fi - # Show python3 module version - python${PYTHON3_VERSION} -m pip --version }