Skip to content

Commit

Permalink
Fix #822
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard20181 committed Dec 31, 2024
1 parent 92b0ba5 commit 4ec5226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ fi
python_version=$(python3 -c 'import sys;print("{0}{1}".format(*(sys.version_info[:2])))')
PYTHON_VENV_DIR="$(dirname "$PWD")/python3-env"
if [ "$python_version" -ge 311 ] || [ -f "$PYTHON_VENV_DIR/bin/activate" ]; then
python3 -c "import venv" >/dev/null 2>&1 || {
if ! (python3 -c "import venv" >/dev/null 2>&1) || ! (python3 -c "import ensurepip" >/dev/null 2>&1); then
case "$PM" in
zypper)
if ! (sudo "$PM" "${INSTALL_OPTION[@]}" "python3-venvctrl"); then
Expand All @@ -175,7 +175,7 @@ if [ "$python_version" -ge 311 ] || [ -f "$PYTHON_VENV_DIR/bin/activate" ]; then
fi
;;
esac
}
fi
echo "Creating python3 virtual env"
python3 -m venv --system-site-packages "$PYTHON_VENV_DIR" || {
echo "Failed to upgrade python3 virtual env, clear and recreate"
Expand Down

0 comments on commit 4ec5226

Please sign in to comment.