Skip to content

Commit

Permalink
Update cyberpanel.sh - fix python3-packaging problem with pip
Browse files Browse the repository at this point in the history
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. ***
  • Loading branch information
micfogas authored Dec 30, 2024
1 parent 6f28d39 commit 6dd2a3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cyberpanel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dd2a3f

Please sign in to comment.