Debian Bookworm:在 PEP 668 之后安装 Python

Debian Bookworm:在 PEP 668 之后安装 Python

我有基本的 Debianbookworm和/或sid镜像。我想在这些中使用apt.即使是简单的一句话也apt install python3说不通

error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

我确实理解这个问题,并且熟悉 PEP 668。我仍然认为首先应该安装 Python,以便将 Python 解释器添加到我的图像中。如何apt从 Debian 存储库安装 Python?

相关内容