如何在 Ubuntu 上安装 Python 3

ubuntu安装python3的方法:

1
2
3
4
5
6
7
8
9
10
11
12
## remove old version 
apt-get remove --auto-remove

#1、安装python3 -y

apt-get install python3
#2、安装pip3

apt-get install python3-pip -y

# pip3 install docker-compose

阅读更多

在 wsl ubuntu 18.04 上安装 Docker 引擎

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
#Set up the repository
#Update the apt package index and install packages to allow apt to use a repository over HTTPS:

sudo apt-get update -y
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update -y
sudo apt-get install docker-ce docker-ce-cli containerd.io

service docker start
sudo systemctl enable docker

sudo docker run hello-world
阅读更多