how can i fix this error
Closed this issue · 3 comments
How can I fix this error when I want to run the code python3 bot.py
Traceback (most recent call last):
File "bot.py", line 24, in <module>
from telegram import ParseMode, Message, Chat, InlineKeyboardMarkup, \
ImportError: No module named 'telegram'
# sudo pip install python-telegram-bot
I did that
Requirement already satisfied: python-telegram-bot in /usr/lib/python2.7/site-packages
Requirement already satisfied: future>=0.16.0 in /usr/lib/python2.7/site-packages (from python-telegram-bot)
Requirement already satisfied: certifi in /usr/lib/python2.7/site-packages (from python-telegram-bot)
Seems like you have both Python2 and Python3 installed. Explicitly installing it for Python3 should work:
# sudo pip3 install python-telegram-bot