"python -m venv venv"
$ python3 -m venv env
$ source env/bin/activate
"python -m venv venv"
$ python3 -m venv env
$ source env/bin/activate
how to use virtualenvwrapper
# install Virtual Environment alternative to virtualenv
pip install virtualenvwrapper
# modify your .profile file
# find out where virtualenvwrapper.sh file is by issuing which command
# source it as shown below
source /usr/local/bin/virtualenvwrapper.sh
# setup an environment
mkvirtualenv dev_env1
mkvirtualenv dev_env2
mkvirtualenv dev_env3
mkvirtualenv dev_env4
# create list of your projects, project1...projectN
mkproject project1
mkproject -p python3 project2 # this project is for python 3 only
mkproject project3
mkproject projectN
# go to the folder where you have cloned an existing repo
# and run the command to bind that project to this environment
setvirtualenvproject
# get list of all environments
workon
# choose a project to work on based on previous output
# say you have dev_env1, dev_env2, dev_env3... dev_envN
# state the name of the project to work on
workon dev_env1
# other tasks
# remove un-needed environments
rmvirtualenv dev_env4
# build a temp environment if needed
mktempenv
# .profile needs this variables set for export
# i.e. export WORKON_HOME="/home/rajib2k5/envs"
# export PROJECT_HOME="/home/rajib2k5/dev"
# in order to leave an environment, run the command below
deactivate
python3 -m venv venv
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:UsersAdminUbuntu", "User")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us