Install and set default Python 3, pip on Ubuntu

Để sử dụng một thư viện lấy video từ reddit được code bằng Python mình cần cài đặt Python 3 cho Ubuntu trong Window 10 của mình (Ubuntu 18.04 thì chỉ có sẵn Python 2).

B1: Cài đặt Python 3

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.7

B2: Cài đặt pip cho Python 3

sudo apt update
sudo apt install python3-pip

B3: Set defualt Python 3

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10

About the Author: vietnamit

You May Also Like