For: When something goes wrong during installation Updated: October 27, 2025 Status: Common issues with solutions
Failed to initialize LLM service: No module named 'structlog'
ModuleNotFoundError: No module named 'structlog'
Python is looking for a package called structlog, but itâs not installed.
â You skipped Step 8: Did not run pip install -r requirements.txt
Step 1: Make sure youâre in the virtual environment (you should see (venv) in your prompt)
Step 2: Run this command to install all dependencies:
pip install -r requirements.txt
Step 3: Wait 3-5 minutes for it to finish
Step 4: Verify it worked:
pip list | grep structlog
You should see structlog 23.2.0 or similar.
Step 5: Try starting Piper Morgan again:
python main.py
â Should work now!
command not found: python3
Your computer doesnât recognize the python3 command.
First, check if Python is installed at all:
Mac/Linux:
which python
or
which python3
Windows:
where python
If it says ânot foundâ: Python is not installed. Go to python.org/downloads and install Python 3.12.
If you see a path like /usr/bin/python3: Python IS installed. Try these alternatives:
Option 1 - Try python instead of python3:
python --version
Option 2 - If that doesnât work, reinstall Python:
command not found: git
Git is not installed on your computer.
Mac:
xcode-select --installWindows:
You run the activation command but donât see (venv) in your prompt.
Check 1: Are you in the right folder?
You should be in the piper-morgan folder. Type:
pwd
You should see something ending in piper-morgan.
If not, navigate there:
cd ~/piper-morgan-workspace/piper-morgan
Check 2: Try the activation command again
Mac/Linux:
source venv/bin/activate
Windows:
venv\Scripts\activate
Check 3: If still not working, recreate the virtual environment
rm -rf venv # Remove the old one
python3 -m venv venv # Create a new one
source venv/bin/activate # Activate (Mac/Linux)
# or
venv\Scripts\activate # Activate (Windows)
Invalid API key
Authentication failed
Your Anthropic API key is wrong or missing.
Step 1: Get a new API key from Anthropic
Step 2: Add it to your config file
Mac:
open config/PIPER.user.md
Windows:
notepad config/PIPER.user.md
Step 3: Find this line:
anthropic_api_key: "your-key-here"
Step 4: Replace it with:
anthropic_api_key: "sk-ant-xxx..."
(Use your actual key, keep the quotes)
Step 5: Save the file and close
Step 6: Start Piper Morgan again:
python main.py
Address already in use: ('127.0.0.1', 8001)
Piper Morgan is already running in another terminal window.
Option 1: Close the other terminal
Option 2: If you canât find the other window, wait 30 seconds and try again
Option 3: Restart your computer (nuclear option but always works)
Permission denied
chmod: cannot access
Your computer wonât let you run or modify a file.
This usually happens on the venv activation. Try this:
chmod +x venv/bin/activate
source venv/bin/activate
command not found: pip
pip is not installed or not in your PATH.
Check 1: Are you in the virtual environment?
You should see (venv) in your prompt. If not:
Mac/Linux:
source venv/bin/activate
Windows:
venv\Scripts\activate
Check 2: If you still see âpip: command not foundâ
Try using Python to run pip:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
ModuleNotFoundError: No module named 'fastapi'
ImportError: No module named 'sqlalchemy'
Some Python package is missing.
99% of the time, this means you didnât run Step 8. Run it now:
pip install -r requirements.txt
Wait for it to complete, then try again:
python main.py
The installation is taking forever (more than 10 minutes).
It depends on your internet speed. 3-5 minutes is normal. If itâs taking much longer:
Option 1: Be patient! It might just be slow internet.
Option 2: Check if your internet is working:
ping google.com
If it says âcommand not foundâ (Windows) or hangs, your internet might be down.
Option 3: Cancel and try again
Press Ctrl+C to stop, wait 10 seconds, then run again:
pip install -r requirements.txt
You see lots of red error messages during pip install -r requirements.txt.
Usually yes! Red text during pip install is often just warnings. Let it finish.
Only if the process STOPS and returns to the prompt without installing all packages.
If that happens:
Mac/Linux:
find ~ -name "piper-morgan" -type d
Windows: Use File Explorer:
Once you find it, remember the path for next time.
You installed Python 3.12, but python3 --version still shows 3.9.
You probably have multiple Python versions installed. Your system is using an older one.
Mac/Linux:
Try using the full path to Python 3.12:
/usr/local/bin/python3.12 -m venv venv
Or find where Python 3.12 was installed:
which python3.12
Windows:
Use the Python launcher:
py -3.12 -m venv venv
python3 --version)When stuck, try these in order:
(venv) in your prompt?pip install -r requirements.txtpython3 --version)git --version)git clone ...)venv folder)(venv) in prompt)pip install -r requirements.txt)config/PIPER.user.md)If all of these â , Piper Morgan should run!
If none of these solutions work:
Good error reporting = faster help!
Last updated: October 27, 2025 Status: Ready to help new users!
Error Message:
ERROR: Unknown compiler(s): [['gfortran'], ['flang-new'], ['flang'], ...
Or:
Ă Preparing metadata (pyproject.toml) did not run successfully.
Root Cause:
Why It Happens:
python3 -m venv venv but your system python3 is 3.13 or newerSolution:
rm -rf venv
python3.12 -m venv venv
python -m venv venv
(Python 3.12 should be in your PATH if you installed it correctly)
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
python --version
Should show Python 3.12.x (NOT 3.13+)
pip install -r requirements.txt
Prevention:
python3.12 -m venv venv explicitly (not python3)venv folder firstpython3.12 --versionIf You Still See 3.13 or 3.14:
which python3.12 should existFor comprehensive Windows setup and troubleshooting, see Windows Setup Guide.
Error:
.ps1 cannot be loaded because running scripts is disabled on this system
Solution:
# Run PowerShell as Administrator, then:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Answer "Y" when prompted
# Now try activation again:
.\venv\Scripts\Activate.ps1
Error:
â Pre-commit hook: Windows-illegal characters found in filenames
Windows filenames cannot contain: : < > " | ? *
Why: Youâre committing a file with illegal Windows characters.
Solution:
file (10:30).txt â file-1030.txtTo bypass (not recommended):
git commit --no-verify
Error:
error: unable to create file <path>: Filename too long
Solution:
# Run as Administrator
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
# Then retry clone
Error:
FileNotFoundError: [Errno 2] No such file or directory: 'tests/unit/...'
Why: Test paths use forward slashes (Linux style) but Windows uses backslashes.
Solution:
# Use backslashes in pytest commands:
pytest tests\unit\test_file.py
# Or use quotes with forward slashes:
pytest "tests/unit/test_file.py"
Why: Python not in Windows PATH
Solution:
python --versionIf you encounter Windows-specific issues, consider using WSL2 (Windows Subsystem for Linux):
See Windows Setup Guide - WSL2 Option for setup instructions.