[install_prerequisites.sh] upgrade pip to install tensorflow (#3392) (#3402)

This commit is contained in:
Alexey Suhov 2020-11-27 18:35:28 +03:00 committed by GitHub
parent ff878ffe92
commit 0335cdbbc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -55,7 +55,9 @@ elif [[ -f /etc/lsb-release ]]; then
fi
if [[ $DISTRO == "centos" ]]; then
if command -v python3.7 >/dev/null 2>&1; then
if command -v python3.8 >/dev/null 2>&1; then
python_binary=python3.8
elif command -v python3.7 >/dev/null 2>&1; then
python_binary=python3.7
elif command -v python3.6 >/dev/null 2>&1; then
python_binary=python3.6
@ -65,17 +67,20 @@ if [[ $DISTRO == "centos" ]]; then
if [ -z "$python_binary" ]; then
sudo -E yum install -y https://centos7.iuscommunity.org/ius-release.rpm
#sudo -E yum install -y python36u easy_install python36u-pip
sudo -E yum install -y python36u python36u-pip
sudo -E pip3.6 install virtualenv
python_binary=python3.6
fi
# latest pip is needed to install tensorflow
sudo -E "$python_binary" -m pip install --upgrade pip
elif [[ $DISTRO == "ubuntu" ]]; then
sudo -E apt update
sudo -E apt -y --no-install-recommends install python3-pip python3-venv
python_binary=python3
sudo -E "$python_binary" -m pip install --upgrade pip
elif [[ "$OSTYPE" == "darwin"* ]]; then
python_binary=python3
python3 -m pip install --upgrade pip
fi