title: How to fix ImportError: No module named 'telebot'
body: <p>I'm configuring a bot to send alerts from Zabbix, so I installed Python and the modules:</p>
  
  <pre><code>sudo apt install python python-pip python-setuptools
  </code></pre>
  
  <p>After that, I installed the bot API to use on Zabbix:</p>
  
  <pre><code>python -m pip install --user pyTelegramBotAPI
  </code></pre>
  
  <p>Created the script in <strong>/usr/lib/zabbix/alertscripts/</strong> :</p>
  
  <pre><code>#!/usr/bin/env python
  
  import telebot,sys
  
  BOT_TOKEN='123TOKENAQUI321'
  DESTINATION=sys.argv[1]
  SUBJECT=sys.argv[2]
  MESSAGE=sys.argv[3]
  
  MESSAGE = MESSAGE.replace('/n','\n')
  tb = telebot.TeleBot(BOT_TOKEN)
  tb.send_message(DESTINATION,SUBJECT + '\n' + MESSAGE)
  </code></pre>
  
  <p>Changed permissions:</p>
  
  <pre><code>sudo chmod +x telegram
  
  sudo chown -R zabbix telegram
  </code></pre>
  
  <p>And when testing the script on terminal or Zabbix the following error appears:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File
    "/usr/lib/zabbix/alertscripts/telegram", line 2, in 
        import telebot,sys ImportError: No module named 'telebot'</p>
  </blockquote>
  
  <p>I tried to solve by installing the module:</p>
  
  <pre><code>python -m pip install --user telebot
  </code></pre>
  
  <p>Installing the module did not solve it, so I tried to use python3, and the script on the terminal worked, but in Zabbix still showing the same error. I ended up going back to python.</p>
  
  <p>The telebot module does not appear with <code>pip list</code>, only inside the python terminal using the  command <code>help ("modules")</code>.</p>
  
  <p>Does anyone know that may be causing the problem?</p>