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

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Jun 21, 2022

This requires upgrading the patch versions of Python we use. I simply used the latest as listed here: https://www.python.org/downloads/

https://stackoverflow.com/questions/71577626/issues-installing-python-3-8-10-on-macos-12-3-monterey

I have not run any benchmarks given how unlikely a client-side performance regression is here. Instead, I intend to look at nightly benchmarks closely tomorrow if this gets merged.

(I did test the Docker builds though with docker build -f docker/Dockerfiles/Dockerfile-release . --build-arg RALLY_VERSION==2.4.0 and docker build -f docker/Dockerfiles/Dockerfile-dev ..)

@pquentin pquentin requested a review from dliappis June 21, 2022 10:29
@pquentin pquentin added enhancement Improves the status quo :Packaging Installation issues or packaging problems labels Jun 29, 2022
@pquentin pquentin added this to the 2.5.1 milestone Jun 29, 2022
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Left a comment

"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!

@dliappis dliappis self-requested a review June 29, 2022 12:39
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM

@pquentin pquentin merged commit 466779b into elastic:master Jun 29, 2022
@pquentin pquentin deleted the m1-support branch June 29, 2022 12:45
@pquentin pquentin added bug Something's wrong and removed enhancement Improves the status quo labels Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Packaging Installation issues or packaging problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants