You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The macOS installer for Python 3.7.4 places "Python.framework" into /Library/Frameworks/ However, the top-level symlinks inside the framework are broken for "Headers" and "Resources". Because of this, the framework can not be imported into an Xcode project.
Thanks for the reminder. Unfortunately, the macOS installer is working as designed. As discussed at length in bpo-18117 (and elsewhere), building using the -framework Python, either directly in compiler calls or indirectly through Xcode is problematic because python.org Python installers install all versions, 2.x and 3.x, into the same framework location, /Library/Frameworks/Python.framework. Since it was common especially in the early days of Python 3 to install both Python 2 and Python 3, the decision was made to only have Python 2.x installs add or modify the Current symlink. As also noted, it was probably a mistake back then to not install Python 3.x versions to a differently-names framework so you can be sure whether you are attempting to link with Python 2 or Python 3 but that ship has sailed. However now that Python 2 is about to enter end-of-life, we should reconsider that behavior.
In the meantime, there should be a simple workaround: just create the symlink yourself after installing a new Python 3.x version. So something like:
rm -f Current
ln -s 3.7 Current
With Python 2 now officially retired, it's time to change the installer behavior. With the merged change, as of Python 3.9.0 (alpha 6) the python.org macOS installers will now update the Current version symmlink in the /Library/Frameworks Python being installed. Since this would be a change in behavior that could affect current users of Python 3.8.x or 3.7.x, I think we should not backport this to those versions. Thanks again for the report!