fix: Handle Ubuntu 24.04 externally-managed Python environment
This commit is contained in:
parent
1c5b3f666a
commit
da3dbff1c2
|
|
@ -79,9 +79,18 @@ sudo apt install -y nodejs
|
|||
# PYTHON
|
||||
# ============================================
|
||||
log "📦 Installing Python development tools..."
|
||||
sudo apt install -y python3 python3-pip python3-venv python3-dev python-is-python3
|
||||
sudo apt install -y python3 python3-pip python3-venv python3-dev python-is-python3 python3-full
|
||||
|
||||
pip3 install --user \
|
||||
# Check if we need --break-system-packages (Ubuntu 24.04+)
|
||||
if python3 -m pip --version 2>/dev/null | grep -q "externally-managed"; then
|
||||
PIP_ARGS="--break-system-packages"
|
||||
else
|
||||
PIP_ARGS=""
|
||||
fi
|
||||
|
||||
pip3 install $PIP_ARGS \
|
||||
pipenv poetry pytest black flake8 mypy bandit pylint \
|
||||
jupyter notebook requests || pip3 install --user \
|
||||
pipenv poetry pytest black flake8 mypy bandit pylint \
|
||||
jupyter notebook requests
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue