Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pyenv install on Apple Silicons Macs #1522

Merged
merged 3 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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: 4 additions & 4 deletions .ci/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"WHEEL": "0.37.0"
},
"python_versions": {
"PY38": "3.8.10",
"PY39": "3.9.2",
"PY310": "3.10.0",
"MIN_PY_VER": "3.8.10"
"PY38": "3.8.13",
"PY39": "3.9.13",
"PY310": "3.10.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

As of now, if one install's pyenv on an M1 using brew (which is the first recommendation in the pyenv docs on how to install pyenv on macOS), it pulls pyenv version 2.3.1 which doesn't know how to install Python 3.10.5:


pyenv install --skip-existing 3.10.5
python-build: definition not found: 3.10.5

See all available versions with `pyenv install --list'.

If the version you need is missing, try upgrading pyenv:

  brew update && brew upgrade pyenv
make: *** [prereq] Error 2
bash-5.1$ pyenv --version
pyenv 2.3.1
bash-5.1$ pyenv install --list | grep 3\\\.10
  3.10.0
  3.10-dev
  3.10.1
  3.10.2
  3.10.3
  3.10.4
  miniconda-3.10.1
  miniconda3-3.10.1

Unfortunately lots of users will prefer to install pyenv with homebrew unless we modify our docs to point to installing pyenv using the git checkout as e.g. done on Linux.

Any chance of just switching to 3.10.4 until we fix the issue in our docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for spotting this! Thankfully this is the only version that is affected. I don't think we should update our docs, installing pyenv through homebrew is really convenient.

Downgrading to 3.10.4 is fine as the fix we're interested in was introduced in 3.10.3: https://stackoverflow.com/a/71779344/481584

Do we need someone with a M1 Mac to confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

Downgrading to 3.10.4 is fine as the fix we're interested in was introduced in 3.10.3: https://stackoverflow.com/a/71779344/481584

Do we need someone with a M1 Mac to confirm?

I tested the latest commit and installation of Python 3.10.4 worked fine with homebrew installed pyenv version 2.3.1 on macOS M1; make test also worked fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you!

"MIN_PY_VER": "3.8.13"
}
}
2 changes: 1 addition & 1 deletion docker/Dockerfiles/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Install Rally from source inside a virtualenv
################################################################################

FROM python:3.8.12-slim-bullseye as builder
FROM python:3.8.13-slim-bullseye as builder

RUN apt-get -y update && \
apt-get install -y curl git gcc && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfiles/Dockerfile-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.12-slim-bullseye
FROM python:3.8.13-slim-bullseye
ARG RALLY_VERSION
ARG RALLY_LICENSE

Expand Down