Over the weekend I finished1 a tool called Virtualenv Burrito. It’s goal was to be a single command which would setup Virtualenv and Virtualenvwrapper so you could start hacking on Python projects as quickly as possible. As a bonus, it installs the
virtualenv-burrito command which will upgrade those packages to the latest versions I’ve tested.
Virtualenv Burrito was inspired by Pycon sprinters wasting precious time setting up virtual environments instead of sprinting. For many people, it’s sadly complicated to get a virtualenv + virtualenvwrapper environment. The worst part, it’s almost always yak shaving in the way of a real goal.
No more! To have a working virtualenv + virtualenvwrapper environment, run this command2:
curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | bash
That’s it. Whenever you login, you’ll have the full arsenal of virtualenvwrapper commands at your disposal.Virtualenv quickstart
Create a new virtualenv:
Once activated, pip install (without using sudo) whichever Python packages you want. They’ll only be available in that virtualenv. Make as many virtualenvs as you like.
To switch to another virtualenv you’ve created:
To get the latest tested virtualenv + virtualenvwrapper packages:
The real hard work is done by the creators of Virtualenv and Virtualenvwrapper. Virtualenv is maintained by Ian Bicking. Virtualenvwrapper is maintained by Doug Hellman.
For this release, extension points (e.g., postactivate) are not supported. While this doesn’t affect the project goal of getting people coding quickly, it’s a cool feature, and (more importantly) I need it for work. :-) I’ll be adding support soon and making it available via
virtualenv-burrito upgrade. ↩
Truth be told, I think piping the web into your shell is insane. Be safe, and read the code. ↩