2. Where we all start
● easy_install Globally
● And it works! Yay!
● But then....
○ dependencies or versions
○ coordination w/ other developers
○ keeping different systems on same page
○ breaking sys python
3. Case study: Dependencies
Once upon a time in city, much like this one,
there was a newspaper...
….. over 90 Django applications updated
from 0.96 to 1.1.
4. Case study: Breaking sys python
From stackoverflow...
"Is there a way to ensure I can clean everything
up and start from zero?"
"If you remove everything in these 2 directories,
it should clear out all modules...."
5. Why Pip & Virtualenv
● Isolate
○ System packages from project packages
○ Projects from each other
● No sudo required - sys python requires sudo
access, project python doesn’t
6. Becoming the standard...
Pep 405
Python 3.3
http://www.python.org/dev/peps/pep-0405
"... proposes to add to Python a mechanism for
lightweight "virtual environments" with their own
site directories, optionally isolated from system
site directories...."
7. What is...
● pip - replaces easy_install
● virtualenv - creates isolated python
environments
● virtualenvwrapper - to be explained later
12. Where does it live? ~/.virtualenv/foo/...
…/bin
Binaries in your env. Example: ipython
.../include
Dev headers used by the #include directive in C.
…/lib
Where all your python libraries will live
lib/python2.7/site-packages
.../share
Mans & Docs
20. More... Tox http://tox.testrun.org/latest/
Tox as is a generic virtualenv management and test
command line tool you can use for:
● checking your package installs correctly with different
Python versions and interpreters
● running your tests in each of the environments,
configuring your test tool of choice
● acting as a frontend to Continuous Integration servers,
greatly reducing boilerplate and merging CI and shell-
based testing.
21. More .... Keeping things fresh
Autoenv
https://github.com/kennethreitz/autoenv
"Magic per-project shell environments. Very pretentious."
Bundle Scout
http://bundlescout.com/
"Daily emails keep you on top of the latest updates from
your favorite libraries."
22. More .... Keeping things fresh
(cont)
Pip Lint
https://github.com/dcramer/piplint
"Piplint validates your current environment with the
requirements files you've specified."
Pip Tools
https://github.com/nvie/pip-tools
"A set of two command line tools to help you keep your pip-
based packages fresh, even when you've pinned them"
23. The End
Me: Jackie Kazil, @jackiekazil
W/ contributions from...
Chris Adams, @acdha
&
Members of Django-District :-)
http://www.django-district.org/