无法解决错误:帮助我解决错误导入 “telegram.ext” 无法解决。

huangapple go评论67阅读模式
英文:

I am not able to resolve the error :help me to solve the error Import "telegram.ext" could not be resolved

问题

我正在为Telegram编写一个机器人,但出现了这个错误,我无法解决它:“无法解析导入“telegram.ext””
我尝试了多次重新安装pip,但仍然不起作用!
我尝试了多种方法,但无法解决这个错误,我已经检查了一切,错误仍然存在。

英文:

I'm programming a bot for telegram and it's giving this error and I can't resolve it: "Import "telegram.ext" could not be resolved"
I tried several times to reinstall pip from telegram and it's not working!
I've tried several ways and I'm not able to resolve the error, I've checked everything and still the error persists

答案1

得分: 1

尝试:

pip uninstall telegram -y
pip uninstall python-telegram-bot -y
pip install -U python-telegram-bot

然后,

import telegram.ext

这应该解决问题。

英文:

Try:

pip uninstall telegram -y
pip uninstall python-telegram-bot -y
pip install -U python-telegram-bot

Then,

import telegram.ext

It should fix the problem

huangapple
  • 本文由 发表于 2023年7月13日 22:41:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76680654.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定