new venv python code example
Example 1: virtual env create python
sudo apt-get install python3.6-venv
python3 -m venv env
source env/bin/activate
py -m pip install --user virtualenv
py -m venv env
.\env\Scripts\activate
Example 2: python virtual environment
python3 -m venv env
python -m virtualenv env
source env/bin/activate
Example 3: creating venv python3
mkdir project_folder
cd project_folder
python3.7 -m venv myvenv
virtualenv myvenv --python=python3.7
source myvenv/bin/activate
Example 4: 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 5: create a virtual environment python 3
python3 -m venv /path/to/new/virtual/environment
Example 6: how to create a virtual environment in python
source env/bin/activate