Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'telegram.ext'; 'telegram' is not a package

I tried:

  • pip install python-telegram-bot
  • pip3 install python-telegram-bot
  • pip install telegram
  • pip3 install telegram

But the error keeps showing up telling me there is no such package of 'telegram.ext' offered by python-telegram-bot. However, my text editor with python plugin is able to find the package telegram.ext in my environment. I also tried using command prompt dirtectly on that virtual environment I created, still doesn't work. Seems that this same issue is faced by other posts on internet without any resolve.

my text editor plugin can find the package

like image 830
user19499885 Avatar asked Oct 26 '25 12:10

user19499885


1 Answers

I just realized the error was because there was another file named 'telegram.py' in the same directory causing the package import problem. Sorry for this silly mistake. Thank you and I will close the case.

like image 59
user19499885 Avatar answered Oct 29 '25 09:10

user19499885



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!