python virtualenv code example Example 1: python virtualenv python -m venv my_env Example 2: python virtual env $ source venv/bin/activate