Ambiente Virtual Python
python3 -m venv env
python -m virtualenv env #py2
source env/bin/activate
#all this is on same directory
Modern Mosquito
python3 -m venv env
python -m virtualenv env #py2
source env/bin/activate
#all this is on same directory
# Create the virtual environment.
python -m venv venv
# Activate the env.
venv\Scripts\activate.bat
venv\Scripts\activate
pip install virtualenv
cd projectfolder #go to project folder
virtualenv projectname #create the folder projectname
source projectname/bin/activate
<venv>\Scripts\activate.bat
# Add Python and Python Scripts to path
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
$PythonPath = "C:\Python27"
$PythonScriptsPath = "C:\Python27\Scripts"
if ($env:Path -notlike "*$PythonPath*") {
$env:Path = $env:Path + ";$PythonPath"
}
if ($env:Path -notlike "*$PythonScriptsPath*") {
$env:Path = $env:Path + ";$PythonScriptsPath"
}
# Save to machine path
[Environment]::SetEnvironmentVariable( "Path", $env:Path, [System.EnvironmentVariableTarget]::Machine )
# Check machine path
[System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)