From: Thanh Ha Date: Thu, 23 Jan 2020 17:31:29 +0000 (-0500) Subject: DO NOT create a virtualenv in ~/.local X-Git-Tag: v0.50.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F62913%2F2;p=releng%2Fglobal-jjb.git DO NOT create a virtualenv in ~/.local ~/.local is NOT a Python virtualenv and should not be created as such. Using `--user` installs python modules into ~/.local/lib/PYTHON_VERSION/site-packages Making ~/.local a virtualenv messes with the paths in site-packages. This reverts one of the changes from I4b2d778f3fd81565c5dd009d50c969696faba0d2 Ref: https://www.python.org/dev/peps/pep-0370 Signed-off-by: Thanh Ha Change-Id: Ie2635b691c8cdf5718fc2617d4de41a3d5a2c347 --- diff --git a/shell/python-tools-install.sh b/shell/python-tools-install.sh index e27d64ed..5c9dc62b 100644 --- a/shell/python-tools-install.sh +++ b/shell/python-tools-install.sh @@ -33,8 +33,7 @@ tox>=3.7.0 # Tox 3.7 or greater is necessary for parallel mode support yq EOF - # Use `python -m pip` to ensure we are using pip from user venv - python3 -m venv ~/.local + # Use `python -m pip` to upgrade to the latest pip into user site-packages python3 -m pip install --user --quiet --upgrade pip python3 -m pip install --user --quiet --no-warn-script-location --upgrade setuptools python3 -m pip install --user --quiet --no-warn-script-location --upgrade --upgrade-strategy eager -r "$requirements_file"