'Import "telegram" could not be resolved (on MacOS)

I try to install pyhon-telegram-bot on macOS.

python -i
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

But even though the terminal says that I have successfully installed ptb, I get an import error.

Import "telegram" could not be resolved Pylance(reportMissingImports)

And also when checking for the installed version, it says no module not found:

/usr/bin/python: No module named telegram

I used the correct command:

pip3 install python-telegram-bot

I run out of ideas to be honest. On my Windows PC (at home) all works fine. I ptb only working on Windows machines?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source