title: Deploying django app with gunicorn, Importerror in gunicorn log
body: <p>I'm trying to deploy a django app using gunicorn and nginx based on this tutorial:</p>
  
  <p><a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-14-04" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-14-04</a></p>
  
  <p>But im having some trouble getting my gunicorn to work properly,</p>
  
  <p>This is my /etc/init/gunicorn.conf:</p>
  
  <pre><code>description "Gunicorn application server handling myproject"
  
  start on runlevel [2345]
  stop on runlevel [!2345]
  
  respawn
  setuid me
  setgid www-data
  
  
  exec myprojectenv/bin/gunicorn --workers 3 --bind  unix:/myproject/myproject.sock myproject.wsgi:application
  </code></pre>
  
  <p>When in my virtualenv i run:</p>
  
  <pre><code>gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application
  </code></pre>
  
  <p>everything is ok.
  But every time i start gunicorn i get this error in my gunicorn error log:</p>
  
  <pre><code>ImportError: No module named 'myproject'
  </code></pre>
  
  <p>I checked every possible option, but nothing changed.
  Is there anything im missing out?
  Thanks in advance.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I added a chdir line before exec:</p>
  
  <pre><code>chdir /myproject/myprojectenv
  </code></pre>
  
  <p>Im still getting </p>
  
  <pre><code>ImportError: No module named 'myproject'
  </code></pre>