title: Supervisor and Environment Variables
body: <p>I really don't know how to get supervisor to work with environment variables.</p>
  
  <p>Below is a configuration snippet.</p>
  
  <pre><code>[program:htNotificationService]
  priority=2
  #autostart=true
  #autorestart=true
  directory=/home/ubuntu/workspace/htFrontEnd/heythat/htsite
  command = /usr/bin/python htNotificationService.py -service
  stdout_logfile=/var/log/heythat/htNotificationService.log
  redirect_stderr=true
  environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
  stopsignal=QUIT
  </code></pre>
  
  <p>I have tried the following:</p>
  
  <pre><code>environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
  environment=PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
  environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat,PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
  </code></pre>
  
  <p>When I start supervisor I get </p>
  
  <pre><code>htNotificationService: ERROR (abnormal termination)
  </code></pre>
  
  <p>I can start from the shell by setting the python path, but not from supervisor.  In the logs I get an error that says that an import can't be found.  Well, that would be solved if supervisor would work.  I even have the path in /etc/environments?</p>
  
  <p>Why will supervisor not work?</p>