Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure a Python 2 pip is installed
In the README of this repo, it's suggested to use the `ubuntu-latest` environment.
That environment will soon be upgraded to Ubuntu 20.04: https://github.com/actions/virtual-environments/issues/1816

As pointed out in that issue, the updated image comes without a Python 2 pip preinstalled:

    Setup Python dependencies
    /home/runner/work/_actions/github/codeql-action/v1/python-setup/install_tools.sh
    [...]
      + python2 -m pip install --user --upgrade pip setuptools wheel
      /usr/bin/python2: No module named pip
    Warning: Unable to download and extract the tools needed for installing the python dependecies. You can call this action with 'setup-python-dependencies: false' to disable this process.
Florian Bruhin authored and GitHub committed Nov 20, 2020

Unverified

No user is associated with the committer email.
1 parent 7589c05 commit b168eee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python-setup/install_tools.sh
@@ -10,6 +10,10 @@ set -e
# subsequent actions in the current job, and not the current action.
export PATH="$HOME/.local/bin:$PATH"

# The Ubuntu 20.04 GHA environment does not come with a Python 2 pip
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
python2 get-pip.py

python2 -m pip install --user --upgrade pip setuptools wheel
python3 -m pip install --user --upgrade pip setuptools wheel

0 comments on commit b168eee

Please sign in to comment.