1

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?

wowkin2
  • 5,895
  • 5
  • 23
  • 66
exec85
  • 447
  • 1
  • 5
  • 21
  • 3
    ptb works on Mac for sure. I am using it right now. are you using a virtual environment? from what I can see you're getting python 2.7 error but you installed it using pip3 which means on python 3. – Geom Jul 09 '21 at 07:12
  • 1
    oh, sorry my bad. I just didnt see that. Thanks mate! – exec85 Jul 09 '21 at 07:27

0 Answers0