For: Windows developers setting up Piper Morgan for local development Updated: November 21, 2025 Status: Complete setup and troubleshooting guide
If youâre on Windows 10/11 and unfamiliar with any of this, use WSL2:
# 1. Run as Administrator
wsl --install
wsl --set-default-version 2
wsl --install -d Ubuntu-22.04
# 2. From Ubuntu terminal inside WSL
sudo apt update && sudo apt upgrade -y
sudo apt install python3.11 python3.11-venv python3.11-pip git
# 3. Clone and setup
git clone https://github.com/mediajunkie/piper-morgan-product.git
cd piper-morgan-product
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pytest tests/ # Verify setup works
Thatâs it! WSL2 gives you Linux for development while staying on Windows.
# Run PowerShell as Administrator, then:
wsl --install
wsl --set-default-version 2
# Restart your computer when prompted
wsl --install -d Ubuntu-22.04
# First launch will take a few minutes
# Creates Linux user account when done
# Inside Ubuntu terminal (you should see ubuntu prompt)
sudo apt update
sudo apt upgrade -y
sudo apt install python3.11 python3.11-venv python3.11-pip git
# In Ubuntu terminal
cd ~
git clone https://github.com/mediajunkie/piper-morgan-product.git
cd piper-morgan-product
python3.11 -m venv venv
source venv/bin/activate # You should see (venv) in prompt
# Verify Python 3.11
python --version # Should show Python 3.11.x
pip install -r requirements.txt
# Run basic tests
pytest tests/unit/ -v
# Should show passing tests â
From File Explorer:
\\wsl$\Ubuntu-22.04\home\<your-username>\piper-morgan-product
From VS Code:
# In terminal (PowerShell or CMD)
code \\wsl$\Ubuntu-22.04\home\<username>\piper-morgan-product
# Or install "Remote - WSL" extension and click "Open Folder in WSL"
From Command Line (Windows PowerShell):
# Run WSL command from Windows PowerShell
wsl -d Ubuntu-22.04 pwd # See current directory
wsl -d Ubuntu-22.04 python --version # Run Python from WSL
# 1. Open Ubuntu terminal (Start Menu â Ubuntu)
# OR open Terminal and select Ubuntu profile
# 2. Navigate to project
cd ~/piper-morgan-product
source venv/bin/activate
# 3. Make changes (from Windows editor or WSL terminal)
# Everything works as documented in CONTRIBUTING.md
# 4. Commit changes
git add .
git commit -m "Your message"
git push origin your-branch
If you prefer not to use WSL2:
Option A: Windows Package Manager (Easiest)
# Run as Administrator
winget install Python.Python.3.11
Option B: Direct Download
python --version # Should show Python 3.11.x
If not found, restart PowerShell/CMD and try again.
Download from https://git-scm.com/download/win and run installer. Use all default options.
# Choose location for your code
cd C:\Users\YourUsername\code
git clone https://github.com/mediajunkie/piper-morgan-product.git
cd piper-morgan-product
# In the piper-morgan-product directory
python -m venv venv
.\venv\Scripts\Activate.ps1
# You should see (venv) in your prompt
If you get an error about execution policy:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Then try Activate.ps1 again
pip install -r requirements.txt
# Wait 3-5 minutes for installation to complete
python --version # Should show Python 3.11.x
# Run basic tests
pytest tests\unit\ -v
# 1. Open PowerShell
# 2. Navigate to project
cd C:\Users\YourUsername\code\piper-morgan-product
# 3. Activate virtual environment
.\venv\Scripts\Activate.ps1 # PowerShell
# OR
venv\Scripts\activate.bat # CMD (old Command Prompt)
# 4. Make changes
# (All commands work same as Linux, just use \ instead of /)
# 5. Commit changes
git add .
git commit -m "Your message"
git push origin your-branch
Why: Python not in Windows PATH
Fix:
python --versionError:
.ps1 cannot be loaded because running scripts is disabled
Fix:
# Run once as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Then activate normally
.\venv\Scripts\Activate.ps1
Why: Dependencies not installed
Fix:
# Make sure venv is activated (you see (venv) in prompt)
pip install -r requirements.txt
# Wait for completion, then retry
Why: Windows has 260-character path limit
Fix:
# Enable long paths (run as Administrator)
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Then clone again.
Error:
â Pre-commit hook: Windows-illegal characters found in filenames
Windows filenames cannot contain: : < > " | ? *
Why: Youâre committing a file with illegal Windows characters (colons, quotes, etc.)
Fix:
To bypass (not recommended):
git commit --no-verify
Why: Path separator issues (should use \ on Windows in commands)
Fix:
# Wrong (forward slash)
pytest tests/unit/test_file.py
# Right (backslash)
pytest tests\unit\test_file.py
# Or use forward slashes with quotes
pytest "tests/unit/test_file.py"
Why: Youâre in CMD or old PowerShell without Git Bash
Fix:
Why: File might be locked or have wrong permissions
Fix:
# Check if it exists
Test-Path .env
# If it exists and you can't edit, remove and recreate
Remove-Item .env
New-Item .env
# Add your config to .env file
Why: Long filenames or illegal characters in repository
Fix Option 1: Shallow Clone
git clone --depth 1 https://github.com/mediajunkie/piper-morgan-product.git
cd piper-morgan-product
git fetch --unshallow # Get full history after
Fix Option 2: No Checkout First
git clone --no-checkout https://github.com/mediajunkie/piper-morgan-product.git
cd piper-morgan-product
git checkout main
Fix Option 3: Use WSL2 (Recommended)
# Just use WSL2 - it handles this automatically
wsl --install
# Then follow WSL2 setup above
Before considering your setup complete:
python --version shows 3.11.x(venv)pip list | grep -i structlog shows a resultpytest tests/unit/ -v shows â
passinggit status shows clean repositorypre-commit run --all-files completes| Situation | Recommendation |
|---|---|
| New to Windows development | WSL2 |
| Need to use Windows GUI tools | WSL2 + VS Code Remote |
| Prefer pure Windows solution | Native Windows + PowerShell 7 |
| Have performance concerns | WSL2 (actually faster) |
| Just getting started | WSL2 (seriously, itâs best) |
If youâre stuck:
Last Updated: November 21, 2025 Tested On: Windows 10/11, Python 3.11, WSL2 (Ubuntu 22.04), Git 2.42+