Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cyberpanel.sh - fix install failure with python error 'unexpected keyword argument: "strip_trailing_zero"' #1387

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

micfogas
Copy link

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. ***

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. ***
@micfogas
Copy link
Author

I have fully tested this patch with pip3.9 on AlmaLinux. It should function with any distro. It does not break any system dependencies. However, if the python3-packaging package gets installed from dnf/yum, the repo version is 20.9.

This code forces pip to install a version of packaging >= 22. It overrides the default setting of prohibiting the updating of packages install with the distro package manager.

If packaging version on system is <22, this script's installation will fail when installing virtualenv or the requirements.txt file.

Due to changes made to pypi/PIP/python over the past few months will cause fatal errors of "strip_trailing_zero" if this package is not >= version 22.

@micfogas micfogas changed the title Update cyberpanel.sh - fix python3-packaging problem with pip Update cyberpanel.sh - fix install failure with python error 'unexpected keyword argument: "strip_trailing_zero"' Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant