From 4e430da1a9868c6709d2973747eb5a9a1fb7b930 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 20 May 2023 20:30:27 -0400 Subject: [PATCH] Pin python3-platformdirs & python3-virtualenv to 22.04 for Python 2 on 23.10 ? --- scripts/install_python2.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 5e0089f3b..01269fda9 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -22,8 +22,9 @@ ARCH=$(dpkg --print-architecture) # ...unfortunately drag in newer 20.23+ version of python3-virtualenv, leaving # us with /usr/bin/virtualenv 20.23 once again, i.e. preventing Python 2. # Whereas pip (which installs /usr/local/bin/virtualvenv) at least works: -apt -y install python3-pip -pip install virtualenv==20.21.1 --break-system-packages +#apt -y install python3-pip +#pip install virtualenv==20.21.1 --break-system-packages +# #apt -y install virtualenv # https://github.com/iiab/iiab/pull/3535#issuecomment-1503626474 #apt -y install media-types libffi8 libssl3 @@ -61,6 +62,12 @@ EOF esac apt update +# 2023-05-20: 4 lines below borrow from Ubuntu 22.04: (Is this really less +# fragile than the pip approach ~40 lines above, in preparing for 24.04 ?) +apt -y install python3-platformdirs=2.5.1-1 +apt-mark hold python3-platformdirs +apt -y install python3-virtualenv=20.13.0+ds-2 +apt-mark hold virtualenv apt -y install python2 rm /etc/apt/sources.list.d/python2.list || true apt update