From 0ea259773ff37f8a8fdade2424548a31c0bd6590 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 13 Sep 2018 20:04:51 -0400 Subject: [PATCH] Use `python -m pip` to ensure updated pip is used /usr/bin/pip is usually an OS level wrapper for pip. Calling `python -m pip` ensures that we are getting the pip we are installing rather than the OS local version. Change-Id: I054d1cc0455c700e00450295cf76d925cff99f73 Signed-off-by: Thanh Ha --- releasenotes/notes/pip-update-7b5d4d3c59c1b2e5.yaml | 5 +++++ shell/python-tools-install.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/pip-update-7b5d4d3c59c1b2e5.yaml diff --git a/releasenotes/notes/pip-update-7b5d4d3c59c1b2e5.yaml b/releasenotes/notes/pip-update-7b5d4d3c59c1b2e5.yaml new file mode 100644 index 00000000..708b417d --- /dev/null +++ b/releasenotes/notes/pip-update-7b5d4d3c59c1b2e5.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Use `python -m pip` to ensure that we are using the pip version that + was installed rather than the OS wrapper version of pip. diff --git a/shell/python-tools-install.sh b/shell/python-tools-install.sh index 5866ea5c..c57609ca 100644 --- a/shell/python-tools-install.sh +++ b/shell/python-tools-install.sh @@ -19,6 +19,6 @@ python-heatclient~=1.16.1 python-openstackclient~=3.16.0 EOF -pip install --user --quiet --upgrade pip==18.0 setuptools==40.0.0 -pip install --user --quiet --upgrade -r "$REQUIREMENTS_FILE" +python -m pip install --user --quiet --upgrade pip~=18.0 setuptools~=40.2.0 +python -m pip install --user --quiet --upgrade -r "$REQUIREMENTS_FILE" pip freeze -- 2.16.6