Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-60nKS4/pip/

[root@master vdb]# python -m pip install --upgrade pip
Collecting pip
Downloading http://mirrors.aliyun.com/pypi/packages/ba/19/e63fb4e0d20e48bd2167bb7e857abc0e21679e24805ba921a224df8977c0/pip-23.2.1.tar.gz (2.1MB)
100% |████████████████████████████████| 2.1MB 543kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-B0JZiK/pip/setup.py”, line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-B0JZiK/pip/
You are using pip version 8.1.2, however version 23.2.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

解决方案

pip 需要更新的版本过高,先安装一个较低版本的pip
pip install --upgrade pip==20.3.4

你可能感兴趣的:(python,pip,开发语言)