pip install virtualenv # install first
cd projectfolder # go to project folder
python -m venv ./venv # Create a virtual environment named venv
Activate.ps1 # (powershell) start the file to start the environment
activate.bat # (cmd) start the file to start the environment
# if it worked you'll see a (venv) in front of your cursor path
# Install venv on linux
sudo apt install python3.8-venv
# Create a venv directory
python3 -m venv tutorial-env
# Activate venv enviroment (do outside the created venv directory)
source tutorial-env/bin/activate
# Save activation as an alias for quick startup
alias runvenv="source tutorial-env/bin/activate"
# for Ubuntu
# first install virtualenv using
sudo apt install python3-virtualenv
# then run
virtualenv -p python3 MyFirstApp
# to activate virtual env
source MyFirstApp/bin/activate
# after activating virtual env, create your django project, etc
# On Windows, invoke the venv command as follows:
# {1} = your python path or you can type python if you make a path
# {2} = your virtual enviroment path + (your VI name) or type the name directly
# {1} -m venv {2}
python -m venv my_venv_name