- Не могу установить модуль Telebot на python 3.6.4
- Ошибка при импорте — ModuleNotFoundError: No module named ‘telebot’
- 2 ответа 2
- Всё ещё ищете ответ? Посмотрите другие вопросы с метками python telegram-bot telegram telegram-api telebot или задайте свой вопрос.
- Похожие
- Подписаться на ленту
- Прочему не работает импорт установленного модуля?
- ModuleNotFoundError: No module named ‘telebot’ #13
- Comments
- drno-reg commented Mar 28, 2018
- MasterGroosha commented Mar 29, 2018
- drno-reg commented Mar 29, 2018
- —— coding: utf-8 ——
- MasterGroosha commented Mar 29, 2018
- drno-reg commented Mar 29, 2018
- MasterGroosha commented Mar 29, 2018
- drno-reg commented Mar 30, 2018
- drno-reg commented Mar 30, 2018
- MasterGroosha commented Mar 30, 2018
- drno-reg commented Mar 31, 2018
- Podvom commented Feb 14, 2019
- jenjajenjaBot commented Nov 22, 2019
- MasterGroosha commented Nov 22, 2019
- jenjajenjaBot commented Nov 28, 2019
- Python3 «module ‘telebot’ has no attribute ‘TeleBot'» #341
- Comments
- Honotoo commented May 20, 2017
- Honotoo commented May 20, 2017
- MasterGroosha commented May 20, 2017
- Honotoo commented May 21, 2017
- MasterGroosha commented May 21, 2017
- Honotoo commented May 21, 2017
- ghost commented Feb 15, 2018
- EnriqueCepeda commented Dec 23, 2018
- EnriqueCepeda commented Dec 26, 2018
- abdullah20401 commented May 14, 2019
- Guatama commented Jun 24, 2019
- HooZz commented Jun 25, 2019
- Guatama commented Jun 25, 2019
- AlexPetul commented Sep 6, 2019
- Falcon-Peregrine commented Sep 21, 2019
- rOOtsystem2010 commented Jan 11, 2020
- Badiboy commented Jan 11, 2020
- kolbak commented Oct 10, 2020
- pvgdevelop commented Jun 30, 2021
Не могу установить модуль Telebot на python 3.6.4
Не могу установить модуль Telebot на python 3, делал уже через pip и в ручную пытался. С простейшей задачей справиться не могу, помогите пожалуйста, вопрос жизни и смерти.
Постоянно пишет:
File «C:/Users/admin/PycharmProjects/untitled/main.py», line 3, in
import telebot
ModuleNotFoundError: No module named ‘telebot’
Process finished with exit code 1
Помощь в написании контрольных, курсовых и дипломных работ здесь.
Python(X,Y) как установить недостающий модуль
Доброго времени суток. Вопрос. У меня на производстве установили Python(X,Y) последней сборки, в.
Не могу установить модуль pg
Не уверен, что нужно писать в эту тему, но. PS C:\Users\MBoY4ik> npm install pg npm http GET.
Python telebot и sqlite3 (Recursive use of cursors not allowed)
Есть телеграм бот, который отправляет сообщения, получая информацию из бд sqlite3: .
Не могу установить библиотеку Python
Всем привет. Зарегистрировался с надеждой найти ответ. Не могу установить библиотеку Python -.
в сам python через pip у меня получилось устанавливить. Во всяком случае папка там появилась: C:\Users\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\pyTelegramBotAPI-3.6.2-py3.6.egg-info
и вот такая
C:\Users\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\telebot
Если честно не знаю, какая, когда появилась. Потому что вожусь с этим уже 3-й день)
А вот Pycharm не видит этого пакета. Точнее я загуглил как можно через settings это все сделать, в итоге получилась вот такая фигня
PyYAML 3.12 3.12
appdirs 1.4.3 1.4.3
certifi 2018.1.18 2018.1.18
chardet 3.0.4 3.0.4
colorama 0.3.9 0.3.9
future 0.16.0 0.16.0
idna 2.6 2.6
pip 9.0.3 9.0.3
python-telegram-bot 10.0.1 10.0.1
requests 2.18.4 2.18.4
setuptools 28.8.0 39.0.1
telebot 0.0.3 0.0.3
teleg-api-bot 0.0.111 0.0.111
telegram-pi-bot 0.2.4 0.2.4
telegram-send 0.20 0.20
urllib3 1.22 1.22
Но к сожалению ситуации это не исправило. А через консоль так и не разобрался, что там писать нужно
Источник
Ошибка при импорте — ModuleNotFoundError: No module named ‘telebot’
Пишу бота телеграм и получаю ошибку:
2 ответа 2
- pip install pyTelegramBotAPI
- pip list — проверить, установился ли pyTelegramBotAPI. Если в списке установленных модулей есть telebot — удалить. Должен остаться только pyTelegramBotAPI
- При создании проекта в PyCharm указать путь до установленного интерпретатора python
- Пробовать запустить скрипт прямо в PyCharm. После этого пробовать запускать через командную строку(если необходимо).
Эта ошибка связана с блокировкой телеграм на территории РФ. Попробуйте установить ВПН
Всё ещё ищете ответ? Посмотрите другие вопросы с метками python telegram-bot telegram telegram-api telebot или задайте свой вопрос.
Похожие
Подписаться на ленту
Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.
дизайн сайта / логотип © 2021 Stack Exchange Inc; материалы пользователей предоставляются на условиях лицензии cc by-sa. rev 2021.10.19.40494
Нажимая «Принять все файлы cookie» вы соглашаетесь, что Stack Exchange может хранить файлы cookie на вашем устройстве и раскрывать информацию в соответствии с нашей Политикой в отношении файлов cookie.
Источник
Прочему не работает импорт установленного модуля?
По учебнику пытаюсь сделать телеграмм бота.
- Установил чистую серверную Ubuntu 18.04.3
- Установил pip
- Через pip установил модули pytelegrambotapi и telebot (командой pip list они выводятся)
- через ssh подключился к серверу.
- перешёл в папку, где будет лежать весь проект
- Выполняю команду python3 — попадаю в интерпретатор
- Выполняю команду import telebot
В итоге получаю ошибку:
Traceback (most recent call last):
File «», line 1, in
ModuleNotFoundError: No module named ‘telebot’
Что нужно сделать, чтобы импорт работал?
- Вопрос задан более года назад
- 4950 просмотров
Подозреваю что вы поставили библиотеку для второго Питона,
командой pip install pytelegrambotapi
А следует
pip3 install pytelegrambotapi => pip3
Хорошим тоном считается использование виртуального окружения, отдельного на каждый проект.
Соответственно ставьте пакеты в него, а не глобально.
Про виртуальное окружение почитаю и буду применять, благодарю за совет.
Источник
ModuleNotFoundError: No module named ‘telebot’ #13
Comments
drno-reg commented Mar 28, 2018
Лучше не стало после установки пакета
pip install pytelegrambotapi
c:\python36\scripts\pip install pytelegrambotapi
Requirement already satisfied: pytelegrambotapi in c:\python36\lib\site-packages
Requirement already satisfied: requests in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: six in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: urllib3 =1.21.1 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: idna =2.5 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: chardet =3.0.2 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
The text was updated successfully, but these errors were encountered:
MasterGroosha commented Mar 29, 2018
Во-первых, не нужно открывать новые issue, если речь идёт о старых. В закрытые issue можно комментировать.
Во-вторых, Вы бы всё-таки удосужились прочитать то, что скинули. Питон пишет, что библиотека уже установлена и этот текст НЕ является сообщением об ошибке.
drno-reg commented Mar 29, 2018
Думалось не придется так детализировать.
НО придется
взял ваш листинг
—— coding: utf-8 ——
import telebot
import config
@bot.message_handler(content_types=[«text»])
def repeat_all_messages(message): # Название функции не играет никакой роли, важно не повторяться
bot.send_message(message.chat.id, message.text)
if name == «main«:
bot.polling(none_stop=True)
установил пакет pip install pytelegrambotapi
он установился успешно
c:\python36\scripts\pip install pytelegrambotapi
Requirement already satisfied: pytelegrambotapi in c:\python36\lib\site-packages
Requirement already satisfied: requests in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: six in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: urllib3 =1.21.1 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: idna =2.5 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: chardet =3.0.2 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
запускаю код возвращается ошибка:
Traceback (most recent call last):
File «C:/Server/Repositories/um_open/templates/Test/TelegramBot1.py», line 3, in
import telebot
ModuleNotFoundError: No module named ‘telebot’
Как решить эту проблему?
MasterGroosha commented Mar 29, 2018
Вопрос на засыпку: какой интерпретатор Python выполняет Ваш код?
drno-reg commented Mar 29, 2018
Python 3.6.5rc1 (v3.6.5rc1:f03c5148cf, Mar 14 2018, 03:12:11) [MSC v.1913 64 bit (AMD64)] on win32
MasterGroosha commented Mar 29, 2018
У меня есть большое подозрение, что либо не тот интерпретатор используется, либо остались хвосты от telebot. Проще перезагрузиться и попробовать ещё раз сделать импорт, иногда помогает.
drno-reg commented Mar 30, 2018
до прошлого воскресенья у меня было 3 интерпретатора: 2.7, 3.6 и 3.7. Сейчас точно один. Представлю доказательства удаления и новой инсталляции
C:\Windows\system32>pip list
DEPRECATION: The default format will switch to columns in the future. You can use —format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
aiohttp (3.1.1)
async-timeout (2.0.1)
attrs (17.4.0)
certifi (2018.1.18)
chardet (3.0.4)
future (0.16.0)
get (0.0.39)
idna (2.6)
idna-ssl (1.0.1)
multidict (4.1.0)
pip (9.0.3)
post (0.0.26)
public (0.0.65)
query-string (0.0.28)
request (0.0.26)
requests (2.18.4)
setuptools (28.8.0)
six (1.11.0)
telepot (12.6)
urllib3 (1.22)
yarl (1.1.1)
C:\Windows\system32>pip install pytelegrambotapi
Collecting pytelegrambotapi
Using cached pyTelegramBotAPI-3.6.2.tar.gz
Requirement already satisfied: requests in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: six in c:\python36\lib\site-packages (from pytelegrambotapi)
Requirement already satisfied: chardet =3.0.2 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: urllib3 =1.21.1 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Requirement already satisfied: idna =2.5 in c:\python36\lib\site-packages (from requests->pytelegrambotapi)
Installing collected packages: pytelegrambotapi
Running setup.py install for pytelegrambotapi . done
Successfully installed pytelegrambotapi-3.6.2
C:\Windows\system32>pip list
DEPRECATION: The default format will switch to columns in the future. You can use —format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
aiohttp (3.1.1)
async-timeout (2.0.1)
attrs (17.4.0)
certifi (2018.1.18)
chardet (3.0.4)
future (0.16.0)
get (0.0.39)
idna (2.6)
idna-ssl (1.0.1)
multidict (4.1.0)
pip (9.0.3)
post (0.0.26)
public (0.0.65)
pyTelegramBotAPI (3.6.2)
query-string (0.0.28)
request (0.0.26)
requests (2.18.4)
setuptools (28.8.0)
six (1.11.0)
telepot (12.6)
urllib3 (1.22)
yarl (1.1.1)
drno-reg commented Mar 30, 2018
в общем не помогло (((
C:\Server\Repositories\um_open\venv\Scripts\python.exe C:/Server/Repositories/um_open/templates/Test/TelegramBot1.py
Traceback (most recent call last):
File «C:/Server/Repositories/um_open/templates/Test/TelegramBot1.py», line 3, in
import telebot
ModuleNotFoundError: No module named ‘telebot’
MasterGroosha commented Mar 30, 2018
Стоп. Вы запускаете скрипт в виртуальном окружении (venv), а библиотеку ставите в глобальное. Либо не используйте venv, либо ставьте библиотеку внутри него
drno-reg commented Mar 31, 2018
заработало, досадная ошибка действительно, благодарю за внимание к моим вопросам
Podvom commented Feb 14, 2019
У меня же ошибка на счёт pyTelegramBotAPI,
$ git push heroku master
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 6 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (12/12), 1.13 KiB | 385.00 KiB/s, done.
Total 12 (delta 1), reused 0 (delta 0)
remote: Compressing source files. done.
remote: Building source:
remote:
remote: ——> Python app detected
remote: ——> Installing python-3.6.8
remote: ——> Installing pip
remote: ——> Installing SQLite3
remote: ——> Installing requirements with pip
remote: Collecting pyTelegramBorAPI (from -r /tmp/build_1bd91cc91b83923385692023dce257eb/requirements.txt (line 1))
remote: Could not find a version that satisfies the requirement pyTelegramBorAPI (from -r /tmp/build_1bd91cc91b83923385692023dce257eb/requirements.txt (line 1)) (from versions: )
remote: No matching distribution found for pyTelegramBorAPI (from -r /tmp/build_1bd91cc91b83923385692023dce257eb/requirements.txt (line 1))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy.
remote:
remote: ! Push rejected to bot-lowxp.
remote:
To https://git.heroku.com/bot-lowxp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/bot-lowxp.git’
jenjajenjaBot commented Nov 22, 2019
Стоп. Вы запускаете скрипт в виртуальном окружении (venv), а библиотеку ставите в глобальное. Либо не используйте venv, либо ставьте библиотеку внутри него
как ставить библиотеку внурти его?
MasterGroosha commented Nov 22, 2019
mkdir botdir
cd botdir
python3 -m venv venv
source venv/bin/activate
pip install pytelegrambotapi
jenjajenjaBot commented Nov 28, 2019
mkdir botdir
cd botdir
python3 -m venv venv
source venv/bin/activate
pip install pytelegrambotapi
Источник
Python3 «module ‘telebot’ has no attribute ‘TeleBot'» #341
Comments
Honotoo commented May 20, 2017
|
import telebot
TOKEN=»3156. etc»
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=[‘start’, ‘help’])
def send_welcome(message):
bot.reply_to(message, «Howdy, how are you doing?»)
@bot.message_handler(func=lambda message: True)
def echo_all(message):
bot.reply_to(message, message.text)
bot.polling()
bot = telebot.TeleBot(TOKEN)
AttributeError: module ‘telebot’ has no attribute ‘TeleBot’
The text was updated successfully, but these errors were encountered:
Honotoo commented May 20, 2017
Also I saw the issue here:
#274
It didn`t help
MasterGroosha commented May 20, 2017
How did you install the module?
Honotoo commented May 21, 2017
I installed it, using the pip command, as in the guide.
saw your comment and decided to reinstall it the other way, by «git clone» . it is still not working.
interesting, but when there was no library installed at all, console showed the same result. consequently the problem should be somewhere with python or linux. So i upgraded python with «sudo apt-get upgrade python3». in vain. maybe I should read something?
MasterGroosha commented May 21, 2017
|
After that you should be fine.
Honotoo commented May 21, 2017
pip was installed before with
sudo apt install python-pip
and removed with
python -m pip uninstall pip setuptools
Made all steps, but nothing.
Should mention, that it worked only with «sudo» and «wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py» had to be separate in «wget https://bootstrap.pypa.io/get-pip.py » and «python3 get-pip.py» . perhaps it has some impact
ghost commented Feb 15, 2018
I am having the same issue. Running Python 3.6.4 (64-bit) on Windows 7.
EnriqueCepeda commented Dec 23, 2018
Im also having this issue in ubuntu 18.04 lts
EnriqueCepeda commented Dec 26, 2018
Im also having this issue in ubuntu 18.04 lts
Hi people, the problem I had was about the virtual enviroments, so look that good because it can possibly be a problem of the package installation
abdullah20401 commented May 14, 2019
I have Windows 7 32 bit and I have the same problem.
@bot.message_handler(commands=[‘start’, ‘help’]) AttributeError: ‘TeleBot’ object has no attribute ‘message_handler’
Guatama commented Jun 24, 2019
The same problem on Windows 10. Python 3.7.1
HooZz commented Jun 25, 2019
Hi! I had the issue and in my case there was a name conflict — I named the test file as telebot.py So, «import telebot» statement was importing the file itself and not the module I needed. After the filename change code started to work.
Guatama commented Jun 25, 2019
OMG! I was so blind. «has no attribute ‘Telebot’. but has ‘TeleBot’
AlexPetul commented Sep 6, 2019
OMG! I was so blind. «has no attribute ‘Telebot’. but has ‘TeleBot’
Same problem omg
Falcon-Peregrine commented Sep 21, 2019
I fixed this with ‘TeleBot’ instead of Telebot
rOOtsystem2010 commented Jan 11, 2020
The same problem on Windows 10. Python 3.7.1
Badiboy commented Jan 11, 2020
I suppos you installed telebot
instead of pyTelegramBotAPI
kolbak commented Oct 10, 2020
I fixed this problem by reinstall package pyTelegramBotAPI in my project
pvgdevelop commented Jun 30, 2021
I had the similar issue, except it was AttributeError: module ‘telebot’ has no attribute ‘AsyncTeleBot’
And this was happening in Debian 10
On my local machine Mac OS 11.4 everything worked fine right away.
pip suggests you use python -m pip install —user
it also give the link on issue wth better explanation 5599
This helped helped me
python -m pip install —user -U pyTelegramBotAPI
Note, that running the same, but with -r requirements did NOT work.
Источник