Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Fix get-pip.py compatibility problem with Python3.5 #5356

Merged
merged 7 commits into from
Mar 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions contrib/kubespray/script/environment.sh
Original file line number Diff line number Diff line change
@@ -27,9 +27,11 @@ echo "Install necessray packages"

echo "Install Python3 and pip"
sudo apt-get -y update
sudo apt-get -y install software-properties-common python3 python3-dev
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
sudo apt-get -y install software-properties-common python3 python3-dev python3-pip
# "apt-get install python3" will install python3.5 on Ubuntu 16.04
# The lastest pip doesn't support python3.5.
# Here we use a fixed version number to ensure compatibility.
sudo python3 -m pip install pip==20.3.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please block pip3 version also in dev-box.common.dockerfile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only use fixed pip3 version.

pip for python2.7 has another issue.


echo "Install python packages"
sudo python3 -m pip install paramiko # need paramiko for ansible-playbook