Skip to content

Commit fe428b2

Browse files
committed
ci: install python3.7 using pyenv
This is sub-optimal, ideally all python version should be installed using the same approach.
1 parent 175271e commit fe428b2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

install.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ function install_python_ppa {
2323

2424
function install_python {
2525
local py=$1
26-
apt-get install -y $py $py-dev
27-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | $py
28-
$py -m pip install --upgrade pip
29-
$py -m pip install --upgrade virtualenv
26+
if [[ "$py" != "python3.7" ]]; then
27+
apt-get install -y $py $py-dev
28+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | $py
29+
$py -m pip install --upgrade pip
30+
$py -m pip install --upgrade virtualenv
31+
else
32+
# See https://discuss.circleci.com/t/install-python-3-7-in-machine-executor/25883/5
33+
pyenv versions
34+
pyenv global 3.7.1
35+
fi
3036
}
3137

3238
function init_venv {

0 commit comments

Comments
 (0)