Skip to content

Conversation

@PLePort
Copy link

@PLePort PLePort commented Dec 6, 2025

Installing: Added another comment before $ pip install python-telegram-bot --upgrade that reinforces the need for Python 3.10+. I know this was stated at the beginning of the README, but adding it here would just act as another safety right before install in case it was glossed over. Also, I added a short note that building PTB from source requires Python headers and a C compiler.

Optional Dependencies: Added -U to the pip installs just in case there are outdated dependencies.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey. Thanks for taking the time to PR! I've left some comments below


.. code:: shell
#Requires Python 3.10+.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having this as comment in the shell, I suggest moving it up to line 100, i.e. … ptb on Python 3.10+ via …

Comment on lines +170 to +171
* ``pip install -U "python-telegram-bot[all]"`` installs all optional dependencies.
* ``pip install -U "python-telegram-bot[ext]"`` installs all optional dependencies that are related to ``telegram.ext``, i.e. ``[rate-limiter, webhooks, callback-data, job-queue]``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I'd prefer not to have the upgrade option here. It's likely that people get to this section if they already have PTB installed but need an additional optional dependency. In that case, upgrading PTB might not actually be desired.

To install a pre-release, use the ``--pre`` `flag <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre>`_ in addition.

You can also install ``python-telegram-bot`` from source, though this is usually not necessary.
You can also install ``python-telegram-bot`` from source, though this is usually not necessary. Before building from source, check that Pything headers and a C compiler are installed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTB is a pure-python package and doesn't have any C-bindings. What do you thnik Python headers & C compilers are required for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants