From 6dd2a3f6dc94aa1f6be06d2ef1af60edfdef46d5 Mon Sep 17 00:00:00 2001 From: technotic Date: Mon, 30 Dec 2024 01:12:53 -0800 Subject: [PATCH] Update cyberpanel.sh - fix python3-packaging problem with pip Added code prior to the script's python virtualenv install that upgrades python's 'packaging' package. Recent changes by the pypi team to pip will cause an error of "strip-trailing-zero" in versions of "packaging" that are lower than 22. - code executes pip command to install/reinstall the "packaging" package, even if the package was installed by your distro package manager. *** AlmaLinux 9 (and likely other yum/dnf distros) uses version 20.9 of "packaging" in the rpm repos. Other distros may be affected. *** --- cyberpanel.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cyberpanel.sh b/cyberpanel.sh index 769e27132..3c3110737 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1110,6 +1110,13 @@ export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 #need to set lang to address some pip module installation issue. +### @micfogas - code added to force updating of python3 package 'packaging' to version 22 or higher to avoid fatal error +### +Debug_Log2 "Force updating pip package 'packaging' to \>\=22...,40" +pip install packaging>=22 --root-user-action=ignore --break-system-packages -U --force-reinstall -I +### +### @micfogas end code addition + Retry_Command "pip install --default-timeout=3600 virtualenv" Download_Requirement