[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:

3 Likes

I would like to thank you immensely.
After having my server hacked due to a lack of CSF, I tried every way to upgrade the system and was unable to do so.
After many hours of research, I found your answer. Thank you very much.

1 Like

I’m glad of this :slight_smile:

It helped me to to upgrade thank you,
I have a question, after upgrade i am not able to restore from one-click backup.
i get 404
do you have any idea?

Thank you

Happy to help… but i don’t how to solve your second problem, sorry …