xxxxxxxxxx
sudo apt install python3-venv
python3 -m venv my-project-env
source my-project-env/bin/activate
xxxxxxxxxx
pip install virtualenv
# Creating a virtual env.
virtualenv myvirtualenv
# activating
source env/bin/activate
# on windows
.\env\Scripts\activate
xxxxxxxxxx
# Create a virtual environment to isolate our package dependencies locally
python3 -m venv env
source env/bin/activate # On Windows use `env\Scripts\activate`
xxxxxxxxxx
# installs PIP globally
curl https://bootstrap.pypa.io/get-pip.py | python
# installs virtualenv globally
pip install virtualenv
# creates a virtualenv
virtualenv -p python2.7 venv
# activates the virtualenv
source venv/bin/activate