File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,22 @@ LOGS_INSTALL_LOG_FILE_PATH="$LOGS_DIR_PATH/$LOGS_INSTALL_LOG_FILE_NAME"
158158
159159 echo
160160
161+ PYTHON=$( command -v python3)
162+ if [ -z " $PYTHON " ]; then
163+ echo " Python3 not found in PATH."
164+ exit 1
165+ fi
166+
167+ # xcffib (https://pypi.org/project/xcffib/) requires python >=3.10
168+ PYTHON_VERSION=$( $PYTHON -c " import sys; print('.'.join(map(str, sys.version_info[:2])))" )
169+ if ! $PYTHON -c " import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" ; then
170+ echo " Python >= 3.10 is required (found $PYTHON_VERSION )."
171+ echo " Please install Python 3.10 or higher before continuing."
172+ exit 1
173+ fi
174+
161175 # create Python3 virtual environment
162- virtualenv --python=$( command -v python3 ) $INSTALL_DIR_PATH /.env
176+ virtualenv --python=" $PYTHON_VERSION " $INSTALL_DIR_PATH /.env
163177 source $INSTALL_DIR_PATH /.env/bin/activate
164178 pip3 install --upgrade pip
165179 pip3 install --upgrade setuptools
You can’t perform that action at this time.
0 commit comments