title: Cannot run paho mqtt client -> "ImportError: No module named paho.mqtt.client"
body: <p>I am trying to set up an mqtt client, but I am getting an ImportError:</p>
  
  <p>I installed paho with:</p>
  
  <pre><code>pip install paho-mqtt
  </code></pre>
  
  <p>It said: <code>Successfully installed dnspython-1.15.0 paho-mqtt-1.3.1 python-etcd-0.4.5 urllib3-1.22</code></p>
  
  <p>But when I am trying to call my python script with <code>sudo python listen.py</code> it says:</p>
  
  <pre><code>File "listen.py", line 6, in &lt;module&gt;
    import paho.mqtt.client as mqtt
  ImportError: No module named paho.mqtt.client
  </code></pre>
  
  <p>When I am typing <code>python --version</code> it says: <code>Python 2.7.13</code> and when I call <code>pip freeze</code> paho is listed <code>paho-mqtt==1.3.1</code></p>
  
  <p>Any suggestions what's wrong?</p>