From 1975ab6a793ab0999ebebae312a9450f1b27fac2 Mon Sep 17 00:00:00 2001 From: Ole Schmidt Date: Mon, 12 Feb 2024 15:13:04 +0100 Subject: [PATCH] Minor fixes to python modules (#5350) * Obtain python version from sys module * tensorflow is incompatible with python 3.12 --- python-modules-list.sh | 4 ++-- python-modules.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-modules-list.sh b/python-modules-list.sh index a6836c7c11..50f5deced9 100644 --- a/python-modules-list.sh +++ b/python-modules-list.sh @@ -71,10 +71,10 @@ env: tensorflow == 1.13.1; python_version < '3.8' tensorflow == 2.4.1; python_version == '3.8' - tensorflow == 2.13.1; python_version >= '3.11' + tensorflow == 2.13.1; python_version == '3.11' # See version compatibility table at https://pypi.org/project/tensorflow-metal/ - tensorflow-metal == 1.0.0; sys_platform == 'darwin' and python_version >= '3.11' + tensorflow-metal == 1.0.0; sys_platform == 'darwin' and python_version == '3.11' xgboost == 0.82; python_version < '3.8' xgboost == 1.3.3; python_version == '3.8' diff --git a/python-modules.sh b/python-modules.sh index 7d4b8be203..2dc393192a 100644 --- a/python-modules.sh +++ b/python-modules.sh @@ -30,7 +30,7 @@ python3 -m venv --copies "$INSTALLROOT" # install packages into the venv. # Major.minor version of Python, needed for PYTHONPATH. -pyver=$(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_version())') +pyver="$(python3 -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))')" # Install pinned basic requirements for python infrastructure echo "$PIP_BASE_REQUIREMENTS" > base-requirements.txt