Bash Sourcing Sourcing a virtual environment


Example

When developing several applications on one machine, it becomes useful to separate out dependencies into virtual environments.

With the use of virtualenv, these environments are sourced into your shell so that when you run a command, it comes from that virtual environment.

This is most commonly installed using pip.

pip install https://github.com/pypa/virtualenv/tarball/15.0.2

Create a new environment

virtualenv --python=python3.5 my_env

Activate the environment

source my_env/bin/activate