Skip to content

Commit ded07ed

Browse files
committed
Fix #822
1 parent 92b0ba5 commit ded07ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install_deps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ fi
162162
python_version=$(python3 -c 'import sys;print("{0}{1}".format(*(sys.version_info[:2])))')
163163
PYTHON_VENV_DIR="$(dirname "$PWD")/python3-env"
164164
if [ "$python_version" -ge 311 ] || [ -f "$PYTHON_VENV_DIR/bin/activate" ]; then
165-
python3 -c "import venv" >/dev/null 2>&1 || {
165+
if !(python3 -c "import venv" >/dev/null 2>&1) || !(python3 -c "import ensurepip" >/dev/null 2>&1); then
166166
case "$PM" in
167167
zypper)
168168
if ! (sudo "$PM" "${INSTALL_OPTION[@]}" "python3-venvctrl"); then
@@ -175,7 +175,7 @@ if [ "$python_version" -ge 311 ] || [ -f "$PYTHON_VENV_DIR/bin/activate" ]; then
175175
fi
176176
;;
177177
esac
178-
}
178+
fi
179179
echo "Creating python3 virtual env"
180180
python3 -m venv --system-site-packages "$PYTHON_VENV_DIR" || {
181181
echo "Failed to upgrade python3 virtual env, clear and recreate"

0 commit comments

Comments
 (0)