在Ubuntu 20.04成功安装Python2后,通过以下命令下载get-pip.py: sudo apt install python2
从https://bootstrap.pypa.io/get-pip.py下载get-pip.py, sha256: ffb67da2e976f48dd29714fc64812d1ac419eb7d48079737166dd95640d1debd
运行以下命令:
sudo python2 get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 24226, in
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File "/tmp/tmp6DHWFv/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax