I managed to solve it using python3, but this time I removed the other versions of python completely before installing again, the steps were as follows:
sudo python -m pip uninstall pyTelegramBotAPI
sudo apt remove python python-pip python-setuptools
sudo apt install python3 python3-pip python3-setuptools python3-six
sudo python3 -m pip install pyTelegramBotAPI six
sudo pip install six
Answer from Lucas SF on Stack OverflowI managed to solve it using python3, but this time I removed the other versions of python completely before installing again, the steps were as follows:
sudo python -m pip uninstall pyTelegramBotAPI
sudo apt remove python python-pip python-setuptools
sudo apt install python3 python3-pip python3-setuptools python3-six
sudo python3 -m pip install pyTelegramBotAPI six
sudo pip install six
For like these errors, reinstall the library or use (--upgrade) when you install it!
like this:
pip uninstall telebot
pip install pyTelegramBotAPI
pip install pytelegrambotapi --upgrade
ModuleNotFoundError: No module named 'telebot'
No module named 'telebot'
python - Ошибка при импорте - ModuleNotFoundError: No module named 'telebot' - Stack Overflow на русском
Problems with using PyTelegramBotAPI : Forums : PythonAnywhere
pip install pyTelegramBotAPIpip list- проверить, установился ли pyTelegramBotAPI. Если в списке установленных модулей естьtelebot- удалить. Должен остаться толькоpyTelegramBotAPI- При создании проекта в PyCharm указать путь до установленного интерпретатора python

- Пробовать запустить скрипт прямо в PyCharm. После этого пробовать запускать через командную строку(если необходимо).
Эта ошибка связана с блокировкой телеграм на территории РФ. Попробуйте установить ВПН
Help!
I'm trying to create a Telegram bot using the pyTelegramBotAPI package. I keyed in 'import telebot' as the first line my code, but when I run my code I always get the error ModuleNotFoundError: No module named 'telebot'. I've installed and uninstalled the package countless of times. I need help!
So, I have a code written with telebot, but the bot doesn't start with standard "/start".I tried copying the standard bot code from official documentation, its not working either. What should I do?
Im trying to run a simple example of a telegram bot and always get this error:
Traceback (most recent call last):
File "./bot.py", line 4, in <module>
from telegram.ext import Updater, InlineQueryHandler, CommandHandler
ModuleNotFoundError: No module named 'telegram'Searching for answers I have tried all of the above solutions:
pip install python-telegram-bot --upgrade
git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive cd python-telegram-bot python setup.py install
python -m pip install python-telegram-bot
python3 -m pip install python-telegram-bot
sudo pip3 install -r requirements.txt -U
But still nothing.
Maybe is some kind of problem related to the path of the installation of the python-telegram-module?
Thank you in advance.
This is the code I'm using btw, don't know if it is related to the issue I'm having:
#!/usr/bin/python3
import os
from telegram.ext import Updater, InlineQueryHandler, CommandHandler
import requests
import re
def get_url():
contents = requests.get('https://random.dog/woof.json').json()
url = contents['url']
return url
def bop(bot, update):
url = get_url()
chat_id = update.message.chat_id
bot.send_photo(chat_id=chat_id, photo=url)
def main():
updater = Updater(os.environ['TOKEN'])
dp = updater.dispatcher
dp.add_handler(CommandHandler('bop',bop))
updater.start_polling()
updater.idle()
if __name__ == '__main__':
main()Edit2: Now I'm having the same problem with selenium despite having been using it in the past without any problems. This make me think that I probably messed up something somehow.
Edit: Fuck this title is a mess, I'm sorry.
» pip install python-telegram-bot