title: How to use virtualenv + virtualenvwrapper properly with Vagrant?
body: <p>I found that the most convenient way of installing <em>virtualenv</em> + <em>virtualenvwrapper</em> is by using <a href="https://github.com/brainsik/virtualenv-burrito" rel="nofollow">virtualenvburrito</a>. </p>
  
  <p>Now I can manage to automate my pip installs in a vagrant provision by the following:</p>
  
  <p><strong>Line in Vagrantfile:</strong></p>
  
  <pre><code>config.vm.provision :shell, :path =&gt; "bootstrap.sh"
  </code></pre>
  
  <p><strong>Lines in bootstrap.sh:</strong></p>
  
  <pre><code>curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
  source /root/.venvburrito/startup.sh
  cd /vagrant      
  mkvirtualenv my_project
  pip install -r requirements.txt 
  </code></pre>
  
  <p>Then I run <code>vagrant ssh</code> but then I have to run the following to access my virtual environment:</p>
  
  <pre><code>sudo -i
  source /root/.venvburrito/startup.sh
  workon my_project
  </code></pre>
  
  <p><strong>I don't want to always have to run <code>sudo -i</code> and <code>source /root/.venvburrito/startup.sh</code>, I just want to be able to run <code>workon my_project</code> directly</strong>.</p>
  
  <p>But </p>
  
  <p>(I.) I can't seem to append <code>source /root/.venvburrito/startup.sh</code> to my <code>~/.profile</code> and </p>
  
  <p>(II.) even if it was appended to that file I'd get a permissionerror. I can't seem to change the permissions for any protected file either.</p>