This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: macOS installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x
Type: behavior Stage: resolved
Components: Installation, macOS Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: KevinPackard, ned.deily, ronaldoussoren
Priority: normal Keywords: patch

Created on 2019-09-30 19:37 by KevinPackard, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19650 merged ned.deily, 2020-04-22 08:05
Messages (4)
msg353612 - (view) Author: Kevin Packard (KevinPackard) Date: 2019-09-30 19:37
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.
msg353632 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-10-01 03:29
Thanks for the reminder.  Unfortunately, the macOS installer is working as designed.  As discussed at length in Issue18117 (and elsewhere), building using the -framework Python, either directly in compiler calls or indirectly through Xcode is problematic because 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:

sudo sh
umask 022
cd /Library/Frameworks/Python.framework/Versions
rm -f Current
ln -s 3.7 Current
msg366993 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-04-22 08:27
New changeset bcc136ba892e62078a67ad0ca0b34072ec9c88aa by Ned Deily in branch 'master':
bpo-38329: macOS installers now update Current symlink (GH-19650)
msg366994 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-04-22 08:33
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 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!
Date User Action Args
2022-04-11 14:59:21adminsetgithub: 82510
2020-04-22 08:33:10ned.deilysetstatus: open -> closed
versions: - Python 3.7, Python 3.8
messages: + msg366994

components: + Installation
resolution: fixed
stage: patch review -> resolved
2020-04-22 08:27:29ned.deilysetmessages: + msg366993
2020-04-22 08:05:54ned.deilysetkeywords: + patch
stage: patch review
pull_requests: + pull_request18976
2019-10-01 03:29:25ned.deilysetassignee: ned.deily
title: Top level symlinks are broken in the Python 3.7.4 framework for macOS. -> macOS installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x
messages: + msg353632
versions: + Python 3.8, Python 3.9
2019-09-30 19:37:04KevinPackardcreate