fix: use python 3.10 prior to avoid use python higher than 3.10 mistakenly

pull/672/head
YaoJunchang 2023-04-27 18:43:10 +08:00
parent 63657088f4
commit bf53d0f1e6
1 changed files with 3 additions and 3 deletions

View File

@ -219,10 +219,10 @@ install_python_dependencies() {
# Switch to local virtual env
echo "Switching to virtual Python environment."
if ! inDocker; then
if command -v python3 >/dev/null; then
python3 -m venv "$DIR/venv"
elif command -v python3.10 >/dev/null; then
if command -v python3.10 >/dev/null; then
python3.10 -m venv "$DIR/venv"
elif command -v python3 >/dev/null; then
python3 -m venv "$DIR/venv"
else
echo "Valid python3 or python3.10 binary not found."
echo "Cannot proceed with the python steps."