use pip to upgrade python3 code example Example 1: install pip3 sudo apt install python3-pip Example 2: python3 pip install [server]$ python3 -m pip install