-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.ps1
More file actions
30 lines (24 loc) · 884 Bytes
/
setup.ps1
File metadata and controls
30 lines (24 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
###########################################################
## This file will setup python and the dependant modules ##
###########################################################
if (-Not (Test-Path -Path "localpython"))
{
Write-Host "Installing local python virtual environment"
# Display the installed python versions
py -0p
# Assuming 3.9 and install virtualenv
py -3.9 -m pip install virtualenv
# Create a virtual environment
virtualenv localpython
}
else {
Write-Host "Python virtual environment already exist, skipped."
}
# Ensure scripts can be run - Only uncomment if there is a error on the following step
# Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope CurrentUser
# Activate the environment
localpython\scripts\activate
# Update pip
python -m pip install --upgrade pip
# Update all PIP modules
pip install -r requirements.txt