Skip to content

Commit d5a1a88

Browse files
committed
use python3-pip if python-pip is not available
1 parent e28b2ff commit d5a1a88

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ runs:
143143
sudo -E apt-get -y -qq update
144144
sudo -E apt-get -y -qq install apt-utils build-essential curl git lsb-release wget
145145
# 20.04 does not have pip, so install get-pip.py
146-
sudo -E apt-get -y -qq install python-pip python-setuptools || (sudo -E apt-get -y -qq install python; curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo -E python; sudo -E apt-get -y -qq install python3-pip)
146+
sudo -E apt-get -y -qq install python-pip python-setuptools || sudo -E apt-get -y -qq install python3-pip python3-setuptools python-is-python3 || (sudo -E apt-get -y -qq install python; curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo -E python; sudo -E apt-get -y -qq install python3-pip)
147147
shell: bash
148148
- name: Run jsk_travis test
149149
run: |

travis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ fi
202202
# Note: pip 21.0, in January 2021, will remove Python 2 support
203203
# 12.04's pip does not support install whl
204204
sudo apt-get update -q || echo Ignore error of apt-get update
205-
sudo -E apt-get -y -qq install python python-setuptools
205+
sudo -E apt-get -y -qq install python python-setuptools || sudo -E apt-get -y -qq install python3 python3-setuptools python-is-python3
206206
curl https://files.pythonhosted.org/packages/c4/44/e6b8056b6c8f2bfd1445cc9990f478930d8e3459e9dbf5b8e2d2922d64d3/pip-9.0.3.tar.gz --output /tmp/pip-9.0.3.tar.gz
207207
(cd /tmp; tar -xzf pip-9.0.3.tar.gz)
208-
sudo -H python -m easy_install /tmp/pip-9.0.3
208+
sudo -H python -m easy_install /tmp/pip-9.0.3 || sudo -E apt-get -y -qq install python3-pip
209209
if [[ ! "$ROS_DISTRO" =~ "hydro" ]]; then # on hydro: Could not find a version that satisfies the requirement pip<10 (from versions: )
210210
sudo pip install -I 'pip<10' # on melodic reinsall pip9.0.3, otherwise it fails on, ImportError: Entry point ('console_scripts', 'pip2') not found
211211
fi

0 commit comments

Comments
 (0)