diff --git a/functions-common b/functions-common index 8d5197d70c..52840568e9 100644 --- a/functions-common +++ b/functions-common @@ -1349,7 +1349,10 @@ function pip_install { if [[ -z "$os_PACKAGE" ]]; then GetOSVersion fi - if [[ $TRACK_DEPENDS = True ]]; then + if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then + # TRACK_DEPENDS=True installation creates a circular dependency when + # we attempt to install virtualenv into a virualenv, so we must global + # that installation. source $DEST/.venv/bin/activate local cmd_pip=$DEST/.venv/bin/pip local sudo_pip="env"