[Python] How to Install python-telegram-bot version 20 and above

Discussão em 'Python' iniciado por Stack, Maio 27, 2025.

  1. Stack

    Stack Membro Participativo

    Trying to run examples or telegram bots from official site - https://github.com/python-telegram-bot/python-telegram-bot/tree/master/examples Installed :

    pip install python-telegram-bot


    and when i run the example, i got error back that version is not compatible.

    if __version_info__ < (20, 0, 0, "alpha", 1):
    raise RuntimeError(
    f"This example is not compatible with your current PTB version {TG_VER}. To view the "
    f"{TG_VER} version of this example, "
    f"visit https://github.com/python-telegram-bot/python-telegram-bot/tree/v{TG_VER}/examples"
    )


    It installs PyPi version 13.12 but example checks different version v20. So, the error is reasonable. How can I let example working?

    Continue reading...

Compartilhe esta Página