-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
python@3.9 fails to build from source on macOS Big Sur #9329
Comments
See this notice.
See above.
This is likely part of the problem. |
I have been running brew from /opt/brew to avoid conflicts with company-managed /usr/local files for many months, and nothing like this happened. But I understand your point. Is there any way for me to inhibit deletion of the temporary build tree created during the process? This is the part that fails
But after the error is printed, I can no longer access |
Pass the |
Thanks. It seems to be breaking here: https://github.com/brianjcarroll8/Python/blob/8784d3300ec4ffc58bc0e9ab3cff9a24187dbe4c/setup.py#L1027-L1028 I'll pass the --debug flag to check more details. |
Ah, I think I figured something out. On MacOS Big Sur, the sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') returns an int value of 11 for some reason. Using this code: https://gist.github.com/gkeramidas/3a8d2580e54c8eaff686d0861a9902be#file-gistfile1-txt-L5-L8 I can get past the original error, but then later, inside Lib/distutils/spawn.py at line 66, the same error triggers:
I don't know if it's Homebrew which overrides this sort of thing, but it's a game of whackamole now, because all calls to sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') return the wrong type. Is it sensible to try exporting 'MACOSX_DEPLOYMENT_TARGET' to "11.0" and see if that helps? |
Nope, export MACOSX_DEPLOYMENT_TARGET='11.0' does not change anything here. Still failing because sysconfig.get_config_var() returns 'int' value. |
I'm getting:
|
According to #7857 you can:
Haven't tried it yet tho |
Worked for me :) |
Success!
I just need to find a way for MacOS.version to return 11.0 instead of 11! |
Boom fixed it, just need to call Ruby's This fixed it for me: (line 124) args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version.to_f}" Fixed it in Homebrew/homebrew-core#65866 |
11.1 still ❯ sw_vers
ProductName: macOS
ProductVersion: 11.1
BuildVersion: 20C69 |
Solve it by:
|
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I tried to reinstall all the brew formulas, after upgrading to mac OS Big Sur, by running:
What happened (include command output)
brew install $(cat ~/brew.list)
What you expected to happen
Python 3.9 should install from source.
Step-by-step reproduction instructions (by running
brew
commands)Output of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: