Add robust installation method for externally-managed-environment
Some checks are pending
CI/CD Pipeline / test (ubuntu-latest, 3.10) (push) Waiting to run
CI/CD Pipeline / test (ubuntu-latest, 3.11) (push) Waiting to run
CI/CD Pipeline / test (ubuntu-latest, 3.12) (push) Waiting to run
CI/CD Pipeline / test (windows-latest, 3.10) (push) Waiting to run
CI/CD Pipeline / test (windows-latest, 3.11) (push) Waiting to run
CI/CD Pipeline / test (windows-latest, 3.12) (push) Waiting to run
CI/CD Pipeline / security-scan (push) Waiting to run
CI/CD Pipeline / auto-update-check (push) Waiting to run

- Use python -m pip instead of pip for better virtual environment handling
- Add troubleshooting section for PEP 668 externally-managed-environment errors
- Include --break-system-packages workaround when needed in virtual environments

Addresses system-level pip restrictions that block installation even in venvs.
This commit is contained in:
FSSCoding 2025-09-06 17:09:46 +10:00
parent 6d441fa5af
commit 919f7284a9

View File

@ -89,8 +89,21 @@ cd Fss-Mini-Rag
python3 -m venv .venv python3 -m venv .venv
source .venv/bin/activate # Linux/macOS source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows # .venv\Scripts\activate # Windows
pip install -r requirements.txt
pip install . # Use python -m pip for reliability (handles externally-managed-environment errors)
python -m pip install -r requirements.txt
python -m pip install .
```
**If you get "externally-managed-environment" error:**
```bash
# Verify virtual environment is active
which python # Should show .venv/bin/python
python -m pip --version # Should show .venv path
# If still failing, use override (safe in virtual environment)
python -m pip install -r requirements.txt --break-system-packages
python -m pip install . --break-system-packages
``` ```
**Step 2: Start Using** **Step 2: Start Using**