Python 2 安裝於 Ubuntu 20.04

Ubuntu20.04中發現無法直接使用python,會直接得到一個 Command ‘python’ not found

目標是要安裝python2.x來使用

安裝

# apt install software-properties-common
# apt install python

查看版本

# python2 -V

安裝PIP

使用curl下載get-pip.py

# curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py

Python 2 安装 pip:

# python2 get-pip.py

查看版本

# pip2 --version