银河麒麟更新pip版本到24.3.1提示Invalid version: '0.23kylin1'

新安装的银河麒麟桌面版(2403)[Linux hui-pc 5.4.18-110-generic]
默认python3.8版本
python3 -m pip install --upgrade pip
更新Pip版本至24.3.1后,报错:
ERROR: Exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py”, line 105, in _run_wrapper
status = _inner_run()
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py”, line 96, in _inner_run
return self.run(options, args)
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py”, line 198, in run
packages = self.get_outdated(packages, options)
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py”, line 208, in get_outdated
return [
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py”, line 211, in
if dist.latest_version > dist.version
File “/usr/local/lib/python3.8/dist-packages/pip/_internal/metadata/pkg_resources.py”, line 192, in version
return parse_version(self._dist.version)
File “/usr/local/lib/python3.8/dist-packages/pip/_vendor/packaging/version.py”, line 56, in parse
return Version(version)
File “/usr/local/lib/python3.8/dist-packages/pip/_vendor/packaging/version.py”, line 202, in init
raise InvalidVersion(f"Invalid version: ‘{version}’")
pip._vendor.packaging.version.InvalidVersion: Invalid version: ‘0.23kylin1’

使用pip 24.0版本没问题,但会不停提示更新。

通过pip安装程序时提示:
DEPRECATION: distro-info 0.23kylin1 has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at Deprecate legacy versions and version specifiers · Issue #12063 · pypa/pip · GitHub

DEPRECATION: python-apt 2.0.0.1-0k0.1 has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of python-apt or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at Deprecate legacy versions and version specifiers · Issue #12063 · pypa/pip · GitHub

不要乱动系统自带的的python 他和系统是强耦合的

2 个赞

此话题已在最后回复的 24 小时后被自动关闭。不再允许新回复。