Nidhi Agarwal
Nidhi Agarwal

Reputation: 458

ModuleNotFoundError: No module named 'telethon'

I have installed telethon using the following code:

sudo pip3 install telethon

I tried to reinstall it and get the following message:

 Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.7/site-packages (from rsa->telethon) (0.4.5)

But when i use it in my code:

 from telethon import TelegramClient

It shows the following error:

ModuleNotFoundError: No module named 'telethon'

Where should i look to rectify this error ?

Upvotes: 2

Views: 19257

Answers (1)

Lonami
Lonami

Reputation: 7141

You probably have both Python 2 and Python 3 installed. Just like you do pip3, you should do python3 and not python alone.

Upvotes: 5

Related Questions