setup: fix call to pip/pip3

This should prevent the error:
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
      from pip import main
      ImportError: cannot import name 'main'

As described in:
https://github.com/pypa/pip/issues/5447#issuecomment-407693701
This commit is contained in:
Julian Oes
2020-01-13 18:12:19 +01:00
committed by Lorenz Meier
parent bac4854424
commit 8112a5c417

View File

@@ -107,7 +107,6 @@ sudo apt-get -yy --quiet --no-install-recommends install \
zip \
;
if [[ "${UBUNTU_RELEASE}" == "16.04" ]]; then
echo "Installing Ubuntu 16.04 PX4-compatible ccache version"
wget -O /tmp/ccache_3.4.1-1_amd64.deb http://launchpadlibrarian.net/356662933/ccache_3.4.1-1_amd64.deb
@@ -118,6 +117,7 @@ fi
echo
echo "Installing PX4 Python3 dependencies"
pip3 install --user --upgrade pip setuptools wheel
hash -d pip3 # Needed to prevent ImportError: cannot import name 'main'
pip3 install --user -r ${DIR}/requirements.txt
@@ -125,6 +125,7 @@ pip3 install --user -r ${DIR}/requirements.txt
echo
echo "Installing PX4 Python2 dependencies"
pip install --user --upgrade pip setuptools wheel
hash -d pip3 # Needed to prevent ImportError: cannot import name 'main'
pip install --user -r ${DIR}/requirements.txt