I get the same problem, here are the errors when running the upgrade script:
1.)
Requirement already satisfied: virtualenv==16.7.9 in /usr/local/lib/python3.10/dist-packages (16.7.9)
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.4 documentation. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
2.)
Collecting pyxattr==0.7.1
Using cached pyxattr-0.7.1.tar.gz (30 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/tmp/pip-install-708xzrf2/pyxattr_1457817560954013b0026223f28c2a62/setup.py”, line 22, in
setup(name = “pyxattr”,
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/init.py”, line 108, in setup
return distutils.core.setup(**attrs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 146, in setup
_setup_distribution = dist = klass(attrs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py”, line 278, in init
_Distribution.init(self, dist_attrs)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 286, in init
self.finalize_options()
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py”, line 630, in finalize_options
ep(self)
File “/usr/local/CyberPanel/lib/python3.10/site-packages/setuptools/dist.py”, line 650, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File “/usr/lib/python3.10/importlib/metadata/init.py”, line 173, in load
return functools.reduce(getattr, attrs, module)
AttributeError: module ‘setuptools.dist’ has no attribute ‘check_test_suite’
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
I think this happened because the server was rebooted while the upgrade script was running before.
So, how to fix this problem?