CRITICAL: Fix virtual environment activation issues
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
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 direct .venv/bin/python paths to bypass activation problems - Install packages using full path method (bypasses system restrictions) - Activate environment only after installation for command usage - Handles systems where source .venv/bin/activate fails to override system Python Fixes virtual environment detection issues in restricted environments.
This commit is contained in:
parent
919f7284a9
commit
cec88ead1a
21
README.md
21
README.md
@ -87,23 +87,24 @@ cd Fss-Mini-Rag
|
||||
|
||||
# Install dependencies and package
|
||||
python3 -m venv .venv
|
||||
|
||||
# CRITICAL: Use full path activation for reliability
|
||||
.venv/bin/python -m pip install -r requirements.txt
|
||||
.venv/bin/python -m pip install .
|
||||
|
||||
# Activate environment for using the command
|
||||
source .venv/bin/activate # Linux/macOS
|
||||
# .venv\Scripts\activate # Windows
|
||||
|
||||
# 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
|
||||
# Use direct path method (bypasses system restrictions entirely)
|
||||
.venv/bin/python -m pip install -r requirements.txt --break-system-packages
|
||||
.venv/bin/python -m pip install . --break-system-packages
|
||||
|
||||
# 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
|
||||
# Then activate for using the command
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
**Step 2: Start Using**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user