title: Getting 'ImportError: No module named tornado.httpserver'
body: <p>Trying to deploy a simple tornado app on my Debian 6 server. I've installed tornado using pip and now it is on:</p>
  
  <p>/usr/local/lib/python2.6/dist-packages/tornado</p>
  
  <p>Also I added manually the path to tornado on .bashrc of myuser who executes myapp.py:</p>
  
  <pre><code>PYTHONPATH=/usr/local/lib/python2.6/dist-packages/tornado:/usr/local/lib/python2.6/dist-packages/tornado:/usr/local/lib/python2.6/dist-packages
  </code></pre>
  
  <p>myuser is member of www-data group. </p>
  
  <p>I get this annoying error in /var/log/tornado.log:</p>
  
  <pre><code>File "/path/to/myapp.py", line 1, in &lt;module&gt;
      import tornado.httpserver, tornado.ioloop, tornado.options, tornado.web, os.path, random, string
  ImportError: No module named tornado.httpserver
  </code></pre>
  
  <p>The supervisor.conf is like this:</p>
  
  <pre><code>[group:tornadoes]
  programs=tornado-8000,tornado-8001,tornado-8002,tornado-8003
  
  
  [program:tornado-8000]
  command=python /path/to/myapp.py --port=8000
  directory=/path/to
  user=www-data
  autorestart=true
  redirect_stderr=true
  stdout_logfile=/var/log/tornado.log
  loglevel=info
  [program:tornado-8001]
  command=python /path/to/myapp.py --port=8001
  directory=/path/to
  user=www-data
  autorestart=true
  redirect_stderr=true
  stdout_logfile=/var/log/tornado.log
  loglevel=info
  [program:tornado-8002]
  command=python /path/to/myapp.py --port=8002
  directory=/path/to
  user=www-data
  autorestart=true
  redirect_stderr=true
  stdout_logfile=/var/log/tornado.log
  loglevel=info
  [program:tornado-8003]
  command=python /path/to/myapp.py --port=8003
  directory=/path/to
  user=www-data
  autorestart=true
  redirect_stderr=true
  stdout_logfile=/var/log/tornado.log
  loglevel=info
  </code></pre>
  
  <p>Ironically the very same app with the same configs (aprat form /path/to/myapp.py and file owner) was deployed fine on another Debian test server. Really got confused and appreciate your hints. </p>