title: How do I run uwsgi with virtualenv
body: <p>I'm currently developing my first real python flask project and am about to set up the build server to deploy the "Latest Build" which is built on every check-in.</p>
  
  <p>I have set up a startup script where I start the application using uwsgi and this part is working fine. I have recently also started using <code>virtualenv</code> and by doing so the packages installed are added to my project under <code>projectname\flask\Lib\site-packages</code>.</p>
  
  <p>I'm using <code>nginx</code> as the web server and the config looks like this:</p>
  
  <pre><code>location / { try_files $uri @graderbuild; }
  location @graderbuild {
      include uwsgi_params;
      uwsgi_param UWSGI_CHDIR /usr/local/grader/build;
      uwsgi_param UWSGI_PYHOME /usr/local/grader/build;
      uwsgi_pass 127.0.0.1:3031;
  }
  </code></pre>
  
  <p>I'm starting <code>uwsgi</code> using this:</p>
  
  <pre><code>exec /usr/local/bin/uwsgi --master --socket 127.0.0.1:3031
      --wsgi-file restserver.py --callable app --processes 4 --die-on-term
      --threads 2 &gt;&gt; /var/log/grader-build.log 2&gt;&amp;1
  </code></pre>
  
  <p>Now to where I know if I'm doing it right... currently I am deploying the entire folder to the build server. I don't want to install global python modules just to get my build to work. Right or wrong?</p>
  
  <p>The error I get currently is:</p>
  
  <pre><code>ImportError: No module named flask_wtf
  </code></pre>
  
  <p>If I'm right, how do I configure the setup to use the <code>virtualenv</code> site-packages? My preferred location would be in the <code>startup</code> script and not in the <code>nginx</code> config.</p>