简体   繁体   English

安装模块后出现“No module named”错误

[英]"No module named" error after installing the module

I've installed the pyTelegramBotAPI using pip install pyTelegramBotAPI .我已经安装了pyTelegramBotAPI使用pip install pyTelegramBotAPI I've imported the telebot package to use the API.我已经导入了Telebot包来使用 API。

But when I want to run my program, it says: No module named 'telebot'.但是当我想运行我的程序时,它说:没有名为“telebot”的模块。 The entire error message is:整个错误信息是:

(...file path...) Telegram Bot>CertificateBot.py
Traceback (most recent call last):
(...file path...) \CertificateBot.py", line 1, in <module>
import telebot

ModuleNotFoundError: No module named 'telebot'

I'm using Windows 10.我正在使用 Windows 10。

尝试python3 -m pip install pyTelegramBotAPI可能 pip 将模块安装到不同的 python 版本。

Try this code:试试这个代码:

    
pip3 uninstall telebot
    
pip3 uninstall PyTelegramBotAPI

pip3 install pyTelegramBotAPI
    
pip3 install --upgrade pyTelegramBotAPI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mac OSX:安装Django后发生错误-没有名为django的模块 - Mac OSX: Error after installing Django - No module named django 在virtualenv内安装django haystack之后,“错误:没有名为haystack的模块” - “Error: No module named haystack” after installing django haystack inside virtualenv 安装anaconda之后,python给出错误“没有名为numpy的模块” - After installing anaconda, python gives error “no module named numpy” 安装uwsgi后,python还是会报错:No module named &#39;uwsgi&#39; - after installing uwsgi, python will still error: No module named 'uwsgi' 安装simplejson后没有名为&#39;json&#39;的模块 - No module named 'json' after installing simplejson 安装sklearn后没有名为“ sklearn”的模块 - No module named 'sklearn' after installing sklearn “ImportError: No module named serial” - 安装 pyserial 后 - “ImportError: No module named serial” - after installing pyserial 通过 pip 安装后没有名为“folium”的模块 - No module named 'folium' after installing via pip 即使安装了硒,也没有名为硒的模块 - No module named selenium even after installing it 使用pip安装后,“ImportError:没有名为&#39;requests&#39;的模块” - “ImportError: no module named 'requests'” after installing with pip
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM