-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Provide downloadable free-threaded macOS builds for Python 3.13 #120098
Comments
From the 3.13.0b2 macOS installer Free-threading supportNEW as of 3.13.0b2: This installer package can now optionally install an additional build of Python 3.13 that supports the experimental free-threading feature (running with the global interpreter lock disabled). See the release notice, the 3.13 What's New document, and issue #120098 [this issue] for more information. Because this feature is still considered experimental, the support for it is not installed by default. It is packaged as a separate install option, available by clicking the Customize button on the Installation Type step of the installer as described above. When selected, a separate Known cautions and limitations as of 3.13.0b2:
|
If you want to use automation to install the free-threaded interpreter (rather than by using the familiar macOS RELEASE="python-3.13.0b2-macos11.pkg"
# download installer pkg
curl -O https://www.python.org/ftp/python/3.13.0/${RELEASE}
# create installer choicechanges to customize the install:
# enable the PythonTFramework-3.13 package
# while accepting the other defaults (install all other packages)
cat > ./choicechanges.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>org.python.Python.PythonTFramework-3.13</string>
</dict>
</array>
</plist>
EOF
sudo installer -pkg ./${RELEASE} -applyChoiceChangesXML ./choicechanges.plist -target /
You can then test that both installer builds are now available with something like: $ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled
$ /usr/local/bin/python3.13t -VV
Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
$ # and the traditional interpreter
$ /usr/local/bin/python3.13 -VV
Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
$ # test that they are also available without the prefix if /usr/local/bin is on $PATH
$ python3.13t -VV
Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
$ python3.13 -VV
Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
|
If you cannot depend on the link in
The traditional framework installation by default does something similar, except for alias python3.13="/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13"
alias python3.13t="/Library/Frameworks/PythonT.framework/Versions/3.13/bin/python3.13t"
|
Two small issues I ran into:
% ls /Library/Frameworks/PythonT.framework/Versions/3.13/bin python3.13 python3.13t python3.13t-config
The latter might also be true for the installer action that installs pip, although that may also be user error and I haven't tried to reproduce this yet. I installed both pip and certifi manually for the free-threaded build. |
Would you prefer them to be removed? Lines 2197 to 2202 in 6af190f
Lines 2258 to 2270 in c2d810b
|
Yes, this is deliberate due to the problem described in #124861. Since the issue of setting paths for venv in framework builds has proven to be tricky, I chose not to try to alter
As is now documented in the recently updated Using Python on macOS document document, the free-threaded build links to the third-party shared libraries of the classic build and thus shares the certificates (no need to install certifi again). And selecting the |
As of 3.13.0rc3, the additional information regarding |
[NOTE: This issue is specifically about the python.org macOS installer for 3.13.0 beta 2 and later and how to use it. If you have issues with the free-threading feature itself (not the installation of it on macOS), please search Python Discuss and this CPython issue tracker first and comment or create issues there. Thanks!]
[UPDATE: This issue is now closed. See comment below.]
The CPython release team provides various binaries of Python with each feature and bug-fix release for various platforms, currently Windows and macOS. As has been discussed elsewhere (for example, #112430), there is a strong desire within the community for the release team to also provide additional free-threaded builds in support of the PEP 703 free-threaded ("no GIL") feature currently in beta-testing for Python 3.13.
Since this feature is still labeled as experimental, there will likely be issues and updates that arise as it gets more exposure during the remainder of the 3.13 release cycle. Likewise, supporting packaging and releasing of two separate interpreter binaries, a traditional ("GIL-only") one and the experimental free-threaded ("GIL-optional"), raises new issues, as well. This issue is meant to serve as a meta-issue for free-threading support in the pre-built macOS binaries provided for macOS on python.org by the release team. (Windows support is described here.) 3.13 release notices and the documentation (
readme
's) included with the downloadables for macOS will refer you to this issue to find the latest information.The initial python.org download for free-threaded macOS binaries is included in the 3.13.0 beta 2 release.
The text was updated successfully, but these errors were encountered: