forked from mikepsinn/disease-eradication-plan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
32 lines (24 loc) · 1.29 KB
/
setup.ps1
File metadata and controls
32 lines (24 loc) · 1.29 KB
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
30
31
32
# This script creates a virtual environment and installs all dependencies
Write-Host "Setting up DIH project environment..." -ForegroundColor Green
# Create virtual environment if it doesn't exist
if (!(Test-Path ".venv")) {
Write-Host "Creating virtual environment..." -ForegroundColor Yellow
python -m venv .venv
}
# Activate virtual environment
Write-Host "Activating virtual environment..." -ForegroundColor Yellow
& .\.venv\Scripts\Activate.ps1
# Upgrade pip
Write-Host "Upgrading pip..." -ForegroundColor Yellow
python -m pip install --upgrade pip
# Install requirements
Write-Host "Installing Python packages..." -ForegroundColor Yellow
pip install -r requirements.txt
# Verify critical packages are installed
Write-Host "Verifying package installation..." -ForegroundColor Yellow
python -c "import plotly, pandas, yaml; print('All critical packages installed successfully')"
# Register Jupyter kernel for Quarto
Write-Host "Registering Jupyter kernel..." -ForegroundColor Yellow
python -m ipykernel install --user --name=dih-project-kernel --display-name "DIH Project Kernel"
Write-Host "Setup complete! You can now run 'quarto preview' to start the book." -ForegroundColor Green
Write-Host "Make sure to activate the virtual environment first: .\.venv\Scripts\Activate.ps1" -ForegroundColor Cyan