python virtual environments
With python 2.x use virtualenv
$ virtualenv env
This will make a virtual environment with current python version. If current python is python 2.x but make a virtual environment with python3 then specify the python3 binary with -p option.
$ virtualenv -p python3 env
With python 3.x use lightweight virtual environment.
$ python3 -m venv env
If installed the python 3.x with Homebrew, the binary name of the python 3.x would be python3.