Install Python 2.7.13 to RHEL with pip

System's default Python is 2.7.5 and doesn't come
with pip at all. To install its pip, it would require us to
enable the EPEL repository and install it from there.

The repos we use already include Python 2.7.13. If we install that
we get pip as well.

Change-Id: I083a970697a962ddb301616695c2cf419f1229f8
Reviewed-by: Simo Fält <simo.falt@qt.io>
This commit is contained in:
Tony Sarajärvi
2018-03-21 11:26:05 +02:00
parent 5085220907
commit 794913dde7

View File

@@ -63,8 +63,8 @@ installPackages+=(gtk3-devel)
installPackages+=(libusbx-devel)
# speech-dispatcher-devel for QtSpeech, otherwise it has no backend on Linux
installPackages+=(speech-dispatcher-devel)
# Python
installPackages+=(python-devel python-virtualenv)
# Python 2.7 with python-devel, pip and virtualenv
installPackages+=(python27)
# Python 3 with python-devel, pip and virtualenv
installPackages+=(rh-python36)
# WebEngine
@@ -93,5 +93,8 @@ installPackages+=(libffi-devel)
sudo yum -y update
sudo yum -y install "${installPackages[@]}"
# Make python 2.7 and its pip default
echo "source scl_source enable python27" >> ~/.bashrc
sudo ln -s /opt/rh/rh-python36/root/usr/bin/python3 /usr/local/bin/python3
sudo ln -s /opt/rh/rh-python36/root/usr/bin/pip3 /usr/local/bin/pip3