From: Kefu Chai Date: Wed, 22 Sep 2021 13:27:05 +0000 (+0800) Subject: scripts/build_utils.sh: use "python3 -m venv" to create venv X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1910%2Fhead;p=ceph-build.git scripts/build_utils.sh: use "python3 -m venv" to create venv we started to have following error recently: ``` + local path=/tmp/venv.0D0Gwn9bMl + '[' -d /tmp/venv.0D0Gwn9bMl ']' + command -v python3 + virtualenv -p python3 /tmp/venv.0D0Gwn9bMl /tmp/jenkins5609477504730019125.sh: line 106: virtualenv: command not found ``` instead of relying on `virtualenv`, let's use the builtin venv module to create virtualenv. Signed-off-by: Kefu Chai --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index f2c3dd9ff..364edabd3 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -103,7 +103,7 @@ create_virtualenv () { echo "Will reuse existing virtual env: $path" else if command -v python3 > /dev/null; then - virtualenv -p python3 $path + python3 -m venv $path elif command -v python2.7 > /dev/null; then virtualenv -p python2.7 $path else