Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Better Development Workflows with virtualenvwrapper

doughellmann
September 27, 2011

Better Development Workflows with virtualenvwrapper

Presentation for PyATL discussing how virtualenvwrapper will make you a more productive Python programmer.

doughellmann

September 27, 2011
Tweet

More Decks by doughellmann

Other Decks in Programming

Transcript

  1. Doug Hellmann
    PyATL
    8 April 2010
    Better Development
    Workflows with
    virtualenvwrapper
    Tuesday, September 27, 2011

    View Slide

  2. In the beginning...
    • Install Python
    • Install dependencies
    • Write software
    • Package
    • Release
    • Get rich!
    Tuesday, September 27, 2011

    View Slide

  3. ...and then
    • New project!
    • Upgrade dependencies
    • Write software
    • Package
    • Release
    • Get richer!
    Tuesday, September 27, 2011

    View Slide

  4. But...
    • A Bug in Project 1!
    • Project 1 no longer runs!!
    • Conflict!!!
    Tuesday, September 27, 2011

    View Slide

  5. What’s a Developer to Do? Don’t panic!
    Tuesday, September 27, 2011

    View Slide

  6. Downgrade? Error prone.
    Tuesday, September 27, 2011

    View Slide

  7. Buy another Computer? Pricy
    Tuesday, September 27, 2011

    View Slide

  8. Use a Virtual Machine? Overkill
    Tuesday, September 27, 2011

    View Slide

  9. virtualenv Just right!
    Tuesday, September 27, 2011

    View Slide

  10. Benefits of virtualenv
    Simplicity
    Tuesday, September 27, 2011

    View Slide

  11. Benefits of virtualenv
    Compatibility
    Tuesday, September 27, 2011

    View Slide

  12. Benefits of virtualenv
    Be yourself
    Tuesday, September 27, 2011

    View Slide

  13. Benefits of virtualenv
    Make as many as you want
    Tuesday, September 27, 2011

    View Slide

  14. Benefits of virtualenv
    Isolation
    Tuesday, September 27, 2011

    View Slide

  15. Demonstration: virtualenv
    Tuesday, September 27, 2011

    View Slide

  16. Messy Shortcomings of virtualenv
    Tuesday, September 27, 2011

    View Slide

  17. Still manual Shortcomings of virtualenv
    Tuesday, September 27, 2011

    View Slide

  18. virtualenvwrapper Add another layer
    Tuesday, September 27, 2011

    View Slide

  19. Organization Benefits of virtualenvwrapper
    Tuesday, September 27, 2011

    View Slide

  20. Automation Benefits of virtualenvwrapper
    Tuesday, September 27, 2011

    View Slide

  21. Demonstration: virtualenvwrapper
    Tuesday, September 27, 2011

    View Slide

  22. Favorite Features
    "My favorite thing about using
    virtualenvwrapper is how it
    attracts the babes.”
    - Danny Greenfeld
    “After just the general
    organizational nirvana that can be
    reached w/ the core stuff, the
    hooks are the best.”
    - Paul McLanahan
    Tuesday, September 27, 2011

    View Slide

  23. Automation Hooks
    • create
    • activate
    • deactivate
    • delete
    Tuesday, September 27, 2011

    View Slide

  24. post-create Initialize
    Tuesday, September 27, 2011

    View Slide

  25. Switch working configuration
    post-activate
    Tuesday, September 27, 2011

    View Slide

  26. Demonstration: Hooks
    Tuesday, September 27, 2011

    View Slide

  27. References
    • Ian Bicking’s virtualenv
    • http://pypi.python.org/pypi/virtualenv
    • virtualenvwrapper
    • http://www.doughellmann.com/projects/virtualenvwrapper/
    Tuesday, September 27, 2011

    View Slide