update ubuntu bionic to use python 3.7

The pip package is for python 3.6, but installs pip for all versions of
python. Apparently. Including python 3.7.

So do all other packages, especially the ones where it doesn't work but
pip thinks it is installed anyway. Force a reinstall.
This commit is contained in:
Eli Schwartz 2021-12-03 12:49:46 -05:00
parent 6f8008cd7d
commit 0c30db20b1
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
1 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,7 @@ export DC=gdc
pkgs=(
python3-pip libxml2-dev libxslt1-dev libyaml-dev libjson-glib-dev
python3.7 python3.7-dev
wget unzip cmake doxygen
clang
pkg-config-arm-linux-gnueabihf
@ -47,7 +48,13 @@ done
# packages
eatmydata apt-get -y install "${pkgs[@]}"
install_python_packages
# Actually select the right python version
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 \
--slave /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc python3.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.6.pc
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 \
--slave /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc python3.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.7.pc
python3 -m pip install -U "${base_python_pkgs[@]}" "${python_pkgs[@]}"
# Install the ninja 0.10
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip