From 57e79667d9c0c4e450b35e419e20b6454784c713 Mon Sep 17 00:00:00 2001 From: Yarko Tymciurak Date: Fri, 6 Jan 2017 15:43:23 -0600 Subject: [PATCH] Simple pip install fails for python3 uses: new python preferred method of calling the pip module directly attempts: to clean up (by invitation) an attempt at this by dims When USE_PYTHON3 is specified, run the pip module for aodh installation from the correct python version, as shown in the documentation since python3.4 (it works with all current versions of python2 and python3). https://docs.python.org/3.4/installing/#basic-usage Change-Id: I02090077781bc335a0df4dc54ff37edece281210 --- devstack/plugin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index b7771ddd2..4a5e2e1ba 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -248,11 +248,11 @@ function install_aodh { _aodh_prepare_coordination install_aodhclient if python3_enabled; then - PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null) - sudo -H python${PYTHON3_VERSION} $PIP install -e "$AODH_DIR"[test,$AODH_BACKEND] + PY_VERS=${PYTHON3_VERSION} else - sudo -H pip install -e "$AODH_DIR"[test,$AODH_BACKEND] + PY_VERS=${PYTHON2_VERSION} fi + sudo -H python${PY_VERS} -m pip install -e "$AODH_DIR"[test,$AODH_BACKEND] sudo install -d -o $STACK_USER -m 755 $AODH_CONF_DIR if [ "$AODH_DEPLOY" == "mod_wsgi" ]; then