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

Readme tip to use environment variable to patch causes all Python installation for all versions to fail on MacOS Sonoma 14.0 #176

Open
DiesDasJenes opened this issue Oct 11, 2023 · 1 comment

Comments

@DiesDasJenes
Copy link

Provide environment information

I have a MacOs with Sonoma 14.0. I followed the README of the plugin and set the env var ASDF_PYTHON_PATCH_URL.

To Reproduce

On MacOs set the URL accordingly to the README.
Then run
asdf install python 3.9.0

Describe the Bug

I attempted to install a version of python. The installation would fail without any explanation.

Expected Behaviour

I expected a clean installation of python.

@andrewcrook
Copy link

andrewcrook commented Nov 4, 2023

A couple of things

Not all versions of python officially support Apple Silicon (Mx)

asdf-python uses pyenv which has a plugin called python-build its job is to apply patches and compile compatible versions. This is still limited because of other compatibly issues e.g compiler, sdks , library versions etc.

versions that should work out of the box, that is no ASDF_PYTHON_PATCH_URL set. work for me on Apple silicon with asdf-python are the following.

  • Python 3.7.12+
  • Python 3.8.10+
  • Python 3.9.1+
  • Python 3.10+
  • Python 3.11+
  • Python 3.12+ .....

I haven't gone any further because anything under 3.8 doesn’t receive security updates and is consider to be in end of life. Anything under 3.10 don't get most bug fixes.

There are some unofficial patches out there to get specific versions to work, personally, I don't use them.

Also make sure you have all the dependences installed required to build and require by python.
Homebrew, makes this easy for mac users and I believe even python-build has some builtin compatibility for homebrew.

I have just tried macOS Sonoma will all of the above and they work.

If you’re adamant on getting older versions to work then I suggest looking for unofficial back ports and unofficial patches.
Another option is to use the Intel versions this can be achieved via Rosetta 2 although I see most people have troubles to get it to compile python. Other options are using Intel system emulation with a Linux VM such as Qemu and Docker Buildx which also uses Qemu. Other than that, I would forget using them unless you are forced.

If you have any issues with the above versions without ASDF_PYTHON_PATCH_URL set.
Try looking at setting any verbose and/or tracing arguments if available, look at asdf info and brew doctor for errors and brew list for missing python dependences. If you get any errors provide them and also check your $TMPDIR path for any logs regarding python-build etc and looking at the console app logs also wouldn’t hurt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants