Fix pip installation: Use get-pip.py without sudo, install packages with --user flag
This commit is contained in:
@@ -25,16 +25,19 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
run: |
|
||||||
python3 --version
|
python3 --version
|
||||||
# Install pip if not available
|
# Install pip if not available (without sudo)
|
||||||
if ! command -v pip3 &> /dev/null; then
|
if ! command -v pip3 &> /dev/null && ! python3 -m pip --version &> /dev/null; then
|
||||||
sudo apt-get update && sudo apt-get install -y python3-pip
|
curl -sS https://bootstrap.pypa.io/get-pip.py | python3
|
||||||
fi
|
fi
|
||||||
python3 -m pip install --upgrade pip || pip3 install --upgrade pip
|
# Add user bin to PATH
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
python3 -m pip install --upgrade pip --user
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install --upgrade pip
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
pip3 install -r requirements.txt
|
python3 -m pip install --upgrade pip --user
|
||||||
|
python3 -m pip install -r requirements.txt --user
|
||||||
|
|
||||||
- name: Run update script
|
- name: Run update script
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user