[SOLVED] CyberPanel Update error with Python (TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero')

Hi, suddenly on one of my servers, Ubuntu 22.04 i receive this error on update:

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-he7slesi/cffi.egg-info
      writing /tmp/pip-pip-egg-info-he7slesi/cffi.egg-info/PKG-INFO

My current version/commit
2.3.6
commit: 2c0e5fd48d7485f8cd991148520d97f8e0766f43

Python3 -V
Python 3.10.12

I’ve tried to clear Python cache, reinstall wheel/virtualenv/pip, upgrade and so on, without success.
Other servers, with identical setup, are fine.

Any suggestion is welcome, thanks :slight_smile:

I’ve found a solution (but I haven’t found the cause…) so I’m replying myself, maybe someone can take advantage of this.
Reading about similar problem on GitHub here, i’ve tried to change “packaging” package of Python3 to version 22, using this command:

sudo pip install packaging==22

and the upgrade process finally went fine :slight_smile:

1 Like