报错详情:
[root@k8s001 ~]# pip install kubernetes
Collecting kubernetes
Using cached https://files.pythonhosted.org/packages/60/3f/2fef94fb65e8f94d768356e5fb9be222d18027e6167ccc65e2090917a771/kubernetes-11.0.0.tar.gz
Complete output from command python setup.py egg_info:
error in kubernetes setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-miambu/kubernetes/
You are using pip version 8.1.2, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
问题原因:setuptools版本太旧,需要更新。
问题修复:
[root@k8s001 ~]# pip install --upgrade setuptools