Cannot install pytgcalls, if I just pip install pytgcalls and the result is error because these package versions have conflicting dependencies

pip install pytgcalls~=2.1.0
Collecting pytgcalls~=2.1.0
  Using cached pytgcalls-2.1.0-py3-none-any.whl.metadata (12 kB)
INFO: pip is looking at multiple versions of pytgcalls to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tgcalls==2.0.0 (from pytgcalls) (from versions: none)
ERROR: No matching distribution found for tgcalls==2.0.0

First off, regarding your screenshots: in the future, please copy and paste terminal output, and format it like code. We don’t care about coloured text. We do care about having readable text, and some of us care about not downloading large images. It also means that people can copy and paste parts of the error message when they reply, which makes the discussion easier.

Also, it doesn’t really matter here that apt thinks your system is up to date. The problem isn’t with system packages; the problem is with the Python environment.

No; the error messages don’t say that. The first error message says:

Meaning: pytgcalls 2.1.0 needs to have tgcalls 2.0.0 installed, but there isn’t such a version that’s usable on your Python installation.

The other messages suggest the tgcalls version needed for each other candidate pytgcalls version. But the underlying problem is the same no matter what.

If we check PyPI we can see that there is a 2.0.0 version of tgcalls available. It just doesn’t work for the Python where you’re trying to install it.

If we check the files available for tgcalls, we see that PyPI can’t install it from source (no source distribution was made available). It will only install from a wheel, and therefore it only works for systems that have a wheel. I see from the screenshot that you are using Linux. Therefore, only up to Python 3.9 is supported by wheels.

If you tried using an earlier pytgcalls version instead of 2.1.0, you might end up needing some other version of tgcalls - but they all have the same problem: there are only wheels, that don’t support your Python version. In fact, they’ll probably only support even older Python versions.

Pip automatically tries to “backtrack” like this: if it can’t give you the latest version of something, it will look for an older version that it can give you. But in your case the problem is probably that Python is too new, so Pip is just wasting time on this. It’s a known problem, and the way that packages work right now means that there is no easy solution.

If you want to try building tgcalls from source yourself, you’ll need to grab the source from GitHub and follow instructions in the second part of the README. It looks like you’ll need Docker, and the Docker environment will install several more large packages, such as CMake and Ninja. This is probably why the author didn’t put a source distribution on PyPI: because it’s complicated to build the project.

If you want to use a supported version of Python: if you already have such Python installed, just use the Pip associated with it. You will likely need or want to make a virtual environment first, and install tgcalls and pytgcalls in that environment. If you don’t have a supported Python (3.8 or 3.9 is recommended; 3.6 and 3.7 are supported by the package, but no longer maintained by the Python dev team), you’ll need to install that first.