python3 install virtualenv code example
Example 1: install virtualenv
pip install virtualenv
activate it by doing this:
cd myproject/Scripts/activate
Example 2: virtualenv -p python3
virtualenv -p python3.6 venv
For simple python3
virtualenv -p python3 venv
Example 3: how to create a new virtualenv
to make a new virtualenv:
virtualenv env_name
to activate this virtual environment:
source env_name/bin/activate (on mac and linux)
source env_name/Scripts/activate (on windows)
Example 4: create virtual environment python 3
python3 -m venv /path/to/new/virtual/environment
Example 5: how to use virtual environment python
python3 -m pip install --user virtualenv
Example 6: pip3 venv install
python3 -m venv /path/to/new/virtual/environment
source <venv>/bin/activate