title: ERROR: ModuleNotFoundError: No module named 'Telethon'
body: <p>I am trying to create a Telegram Bot using Python and I get the following error:</p>
  <pre><code>ModuleNotFoundError: No module named 'Telethon'
  </code></pre>
  <p>I already tried this:</p>
  <pre><code>pip3 install telethon
  </code></pre>
  <p>and this</p>
  <pre><code>pip install telethon
  </code></pre>
  <p>like here: <a href="https://stackoverflow.com/questions/55768377/modulenotfounderror-no-module-named-telethon">ModuleNotFoundError: No module named &#39;telethon&#39;</a></p>
  <p>But the error is still the same. When I install telethon there are no error but running this code:</p>
  <pre><code>import Telethon
  import TelegramClient
  
  from telethon.sync import TelegramClient
  from telethon.tl.functions.messages import GetDialogsRequest
  from telethon.tl.types import InputPeerEmpty
  import csv
   
  api_id = placeholder-myid
  api_hash = 'placeholder-myhash'
  phone = '+ placeholder-myNumber'
  client = TelegramClient(phone, api_id, api_hash)
   
  client.connect()
  if not client.is_user_authorized():
      client.send_code_request(phone)
      client.sign_in(phone, input('Enter the code: '))
   
  chats = []
  last_date = None
  chunk_size = 200
  groups=[]
   
  result = client(GetDialogsRequest(
               offset_date=last_date,
               offset_id=0,
               offset_peer=InputPeerEmpty(),
               limit=chunk_size,
               hash = 0
           ))
  chats.extend(result.chats)
   
  for chat in chats:
      try:
          if chat.megagroup== True:
              groups.append(chat)
      except:
          continue
   
  print('Choose a group to scrape members from:')
  i=0
  for g in groups:
      print(str(i) + '- ' + g.title)
      i+=1
   
  g_index = input(&quot;Enter a Number: &quot;)
  target_group=groups[int(g_index)]
   
  print('Fetching Members...')
  all_participants = []
  all_participants = client.get_participants(target_group, aggressive=True)
   
  print('Saving In file...')
  with open(&quot;members.csv&quot;,&quot;w&quot;,encoding='UTF-8') as f:
      writer = csv.writer(f,delimiter=&quot;,&quot;,lineterminator=&quot;\n&quot;)
      writer.writerow(['username','user id', 'access hash','name','group', 'group id'])
      for user in all_participants:
          if user.username:
              username= user.username
          else:
              username= &quot;&quot;
          if user.first_name:
              first_name= user.first_name
          else:
              first_name= &quot;&quot;
          if user.last_name:
              last_name= user.last_name
          else:
              last_name= &quot;&quot;
          name= (first_name + ' ' + last_name).strip()
          writer.writerow([username,user.id,user.access_hash,name,target_group.title, target_group.id])      
  print('Members scraped successfully.')
  </code></pre>
  <p>I know try this on <a href="https://replit.com" rel="nofollow noreferrer">https://replit.com</a> because I thought maybe I made a mistake with downloading anything on my Mac, but on replit.com is the same error.</p>
  <p>What can I do?</p>