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 Overflow
🌐
Finxter
blog.finxter.com › fixed-modulenotfounderror-no-module-named-telebot
[Fixed] ModuleNotFoundError: No module named ‘telebot’ – Be on the Right Side of Change
>>> import telebot Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> import telebot ModuleNotFoundError: No module named 'telebot' The most likely reason is that Python doesn’t provide telebot in its standard library. You need to install it first! Before being able ...
Discussions

No module named 'telebot'
What version of pyTelegramBotAPI are you using? 4.14.1 What OS are you using? Windows What version of python are you using? 3.10.12 I get an saying No module named 'telebot' when I try to r... More on github.com
🌐 github.com
4
0
March 1, 2024
ModuleNotFoundError: No module named 'telebot'
These issues typically happen because you have multiple python installations/versions/environments. To try and figure out what is going on please answer these questions: What operating system are you using? What development environment are you using? How did you install python? what command are you using to install the module? where are you typing it? add this cod to the start of your script, before everything, and show it's output : import sys print(sys.version) print(sys.executable) More on reddit.com
🌐 r/learnpython
1
0
March 24, 2023
python - Ошибка при импорте - ModuleNotFoundError: No module named 'telebot' - Stack Overflow на русском
Пишу бота телеграм и получаю ошибку: D:\python.exe D:/bott/bot.py Traceback (most recent call last): File "D:/bott/bot.py", line 3, in import telebot ModuleNotFoundError: No m... More on ru.stackoverflow.com
🌐 ru.stackoverflow.com
ModuleNotFoundError: No module named 'telebot'
Лучше не стало после установки пакета pip install pytelegrambotapi c:\python36\scripts\pip install pytelegrambotapi Requirement already satisfied: pytelegrambotapi in c:\python36\lib\site-packages Requirement already satisfied: requests ... More on github.com
🌐 github.com
16
March 28, 2018
🌐
GitHub
github.com › eternnoir › pyTelegramBotAPI › issues › 1344
can't import telebot · Issue #1344 · eternnoir/pyTelegramBotAPI
October 22, 2021 - Please answer these questions before submitting your issue. Thanks! What version of pyTelegramBotAPI are you using? 4.1.1 ... hi, i can't import telebot in pyTelegramBotAPI and i get this error: Traceback (most recent call last): File "/home/yaser/Desktop/pyhton codes/Insta-tel-bot/insta/telegram.py", line 2, in import telebot ModuleNotFoundError: No module named 'telebot'
Author   eternnoir
🌐
Medium
pmlss.medium.com › pytelegrambotapi-import-error-attributeerror-module-telebot-has-no-attribute-telebot-2166b20a4428
pyTelegramBotAPI import error: AttributeError: module ‘telebot’ has no attribute ‘TeleBot’ | by 项月亮 | Medium
February 24, 2020 - 2. A familiar module “telebot” also exists in Pypi. If someone wrongly installed it with “pip3 install telebot” instead of pyTelegramBotAPI, python script will import a different module that doesn’t have the attribute.
🌐
GitHub
github.com › MasterGroosha › telegram-tutorial › issues › 13
ModuleNotFoundError: No module named 'telebot' · Issue #13 · MasterGroosha/telegram-tutorial
March 28, 2018 - Лучше не стало после установки пакета pip install pytelegrambotapi c:\python36\scripts\pip install pytelegrambotapi Requirement already satisfied: pytelegrambotapi in c:\python36\lib\site-packages Requirement ...
Author   MasterGroosha
Find elsewhere
🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 26658
Problems with using PyTelegramBotAPI : Forums : PythonAnywhere
I've installed all necessary modules using bash , but I got AttributeError: 'TeleBot' object has no attribute 'message_handler' and if I use sys.modules() while running main file - there is no pytelegrambotapi module. How can I fix it? from flask import Flask, request import telebot token = ...
🌐
Reddit
reddit.com › r/learnpython › telebot error
r/learnpython on Reddit: Telebot error
February 6, 2024 -

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?

🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 32488
I deleted all files and now I can't import pyTelegramBotAPI : Forums : PythonAnywhere
when I import telebot I encounter the following error: from pyTelegramBotAPI import telebot Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'pyTelegramBotAPI'. how can I fix it?
🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 33871
ModuleNotFoundError: No module named 'telebot' : Forums : PythonAnywhere
December 1, 2023 - We use cookies to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media and analytics partners. Details here · I installed the library using pip install pyTelegramBotAPI. I have seen solutions using virtual environments ...
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
PyTelegramBotAPI and Python3 not working - Raspberry Pi Forums
Why are you starting this code with sudo ? Usually not required. On my own pi, I would backup data, use a fresh sd and restart. You could try to uninstall python 3.7 , delete also /usr/local/lib/python3.7/dist-packages/ and /usr/lib/python3.7/ and reinstall python3 again.
🌐
Latenode
community.latenode.com › other questions › telegram bot
Telegram bot development issue: Unable to resolve 'telegram.ext.updater' import - Telegram bot - Latenode Official Community
March 16, 2025 - Help needed with Telegram bot Python library I’m pulling my hair out trying to get a Telegram bot working in Python. Every time I run my code, I get an error saying ‘Import telegram.ext.updater could not be resolved’. It’s driving me crazy! I’ve tried installing the telegram-bot-python ...
🌐
GitHub
github.com › python-telegram-bot › python-telegram-bot › issues › 3517
[Question] Importing Error · Issue #3517 · python-telegram-bot/python-telegram-bot
January 24, 2023 - Import "telegram.ext" could not be resolvedPylancereportMissingImports · My bot suppose to work · Traceback (most recent call last): File "c:\Users\Pruthivi\Desktop\Telegram Bots\ReminderBot\main.py", line 5, in import telegram.ext ModuleNotFoundError: No module named 'telegram' Windows 11 Pro ·
Author   python-telegram-bot
🌐
Stack Overflow
stackoverflow.com › questions › 77828390 › problem-writing-a-telegram-bot-it-shows-import-telegram-ext-updater-could-no
python - Problem writing a telegram bot. It shows "Import "telegram.ext.updater" could not be resolved" - Stack Overflow
Import could not be resolved I tried to install telegram-bot-python from Terminal many times, and also tried to install it from cmd, and nothing. Can someone help? Ive literally tried almost anythi...
🌐
Stack Overflow
stackoverflow.com › questions › 52499589 › telebot-package-problem-with-importing-types
python - Telebot package problem with importing "Types" - Stack Overflow
September 25, 2018 - This posting on GitHub: github.com/eternnoir/pyTelegramBotAPI/issues/323 suggests that this is a common problem that can be resolved by uninstalling telebot and installing pytelegrambotapi.
🌐
Reddit
reddit.com › r/learnpython › error import telegram module although it is installed
r/learnpython on Reddit: Error import telegram module although it is installed
August 16, 2019 -

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.