Answers for "create and activate a virtual environment in windows"

13

activate virtualenv windows

venv\Scripts\activate
Posted by: Guest on May-22-2020
0

activate python venv in windows

# 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)
Posted by: Guest on March-24-2022

Code answers related to "create and activate a virtual environment in windows"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language