Virtualenv for New Pythonistas

PyCon US | April 2015

Renee Chu | @reneighbor | reneighbor on GitHub | Twilio

Matt Makai | @mattmakai | makaimc on GitHub | Twilio

Our day jobs

The Dependencies Problem

Under the covers

echo $PATH

echo $PATH

/usr/local/bin

/usr/bin

bin/activate

VIRTUAL_ENV = "/Users/demo/py/envs/ workproj/env"

export VIRTUAL_ENV

PATH = "$VIRTUAL_ENV/bin:$PATH"

echo $PATH

/Users/demo/py/envs/ workproj/env/bin

/usr/local/bin

/usr/bin

Tips & Tricks

1. Aliases

Linux

~/.bashrc



Mac OS X

~/.bash_profile

2. Autoenv

Autoenv

.env

3. Virtualenvwrapper

For New Pythonistas

  • The Dependencies Problem
  • Virtualenv solution
  • Inside the env directory
  • Tips & Tricks
    1. Aliases
    2. Autoenv
    3. virtualenvwrapper
    4. Docker

Renee Chu


Matt Makai