[Python] How to downgrade Python version from 3.9 to 3.7?

Discussão em 'Python' iniciado por Stack, Março 26, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a RaspberryPi. These are my OS informations:

    pi@raspberrypi:~ $ uname -m
    armv7l

    pi@raspberrypi:~ $ cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


    My actual Python version is:

    pi@raspberrypi:~ $ python --version
    Python 3.9.2


    I would need to install Python 3.7 without uninstalling the current version. I simply want to install the 3.7 version and make it enabled. I tried sudo apt install python3.7 but it didn't work. How to do it?

    pi@raspberrypi:~ $ sudo apt install python3.7
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package python3.7 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.7' has no installation candidate

    Continue reading...

Compartilhe esta Página