0

I ran the command "import telegram" which produced no "no module named telegram" as shown this image

But when I checked my packages in D:\Lib\site-packages the module is clearly there as shown here. The commands I used for downloading the telegram package in the windows terminal was "pip install python-telegram-bot". I also tried "pip3 install python-telegram-bot" "pip3 install python-telegram-bot" "python -m install python-telegram-bot" and "python3 -m install python-telegram-bot" but none of them worked.

How do I resolve this problem?

  • Have you tried using `virtualenv` to isolation the environment ? https://virtualenv.pypa.io/en/latest/ – Elinaldo Monteiro Aug 12 '20 at 15:11
  • There are a lots of packages on PyPi that provide a module named `telegram`. Make sure you installed the right one, as it is bound to confusion. What pip command did you use to install the package? – Quanta Aug 12 '20 at 15:24
  • try uninstalling all the versions of python and try https://github.com/python-telegram-bot/python-telegram-bot – Bijin Abraham Aug 12 '20 at 15:25

1 Answers1

0

have you tried to run it with python3 -u ... enter image description here

you might have multiple version of python on your machine, tried to identify which by using python --version and pip --version

and cheack that they int on the same version of python

enter image description here

and if you are using pycharm you can install it from there so it will install it in the place it running.

enter image description here

Ran Cohen
  • 721
  • 6
  • 15