Skip to content

Commit 2df2aa0

Browse files
committed
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
1 parent 6b9a564 commit 2df2aa0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tools/install_pip.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ echo "Distro: $DISTRO"
4646
function get_versions {
4747
# FIXME(dhellmann): Deal with multiple python versions here? This
4848
# is just used for reporting, so maybe not?
49-
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
49+
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || which pip3 2>/dev/null || true)
5050
if [[ -n $PIP ]]; then
5151
PIP_VERSION=$($PIP --version | awk '{ print $2}')
5252
echo "pip: $PIP_VERSION"
5353
else
5454
echo "pip: Not Installed"
5555
fi
56-
# Show python3 module version
57-
python${PYTHON3_VERSION} -m pip --version
5856
}
5957

6058

0 commit comments

Comments
 (0)