The normal method to upgrade pip in Python environment is to use this following command.
python -m pip install –upgrade pip
However, in some cases, the above command does not work and it may cause the error like this.
To fix this problem, please use the following command instead.
curl https://bootstrap.pypa.io/get-pip.py | python -
The output result: