在新安装的 Ubuntu Server 22.04(Raspberry Pi)上安装 pip3

在新安装的 Ubuntu Server 22.04(Raspberry Pi)上安装 pip3

我刚刚在我的 RPi 上安装了 Ubuntu Server 22.04 LTS,但我无论如何都无法pip3安装。(它应该已经在那里了,不是吗?)

这是我的/etc/os-releasse

PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

这是我的/etc/apt/sources.list

## ...
deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy universe
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates universe
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy multiverse
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-security universe
# ...
deb http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
# ...

# apt update尝试了每一个改变。

我继续运行# apt install python3-pip,但失败了:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-pip' has no installation candidate

即使我运行# python3 -m pip install ansible它也会给我:

/usr/bin/python3: No module named pip

我一直在尝试手动将条目添加到 apt 源文件(例如/etc/apt/sources.list.d/pip.list),但我不知道正确的条目应该是什么样的。
如果有人能告诉我如何找到特定软件包的存储库以及如何格式化该源行,我将获得加分。

相关内容