<html><body><div><div>Thanks, guys. It's helpful to see the content of that alert, which is unhelpful and <opprobrious epithet deleted>. Apple's plan is to entirely remove Python as a giant FU to developers who accepted it as part of the system (I recall a time when Apple was pushing Python and Ruby as first-class application languages, with Xcode templates to develop applications). <br></div><div><br></div><div><a rel="noopener noreferrer" href="https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be-removed/">https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be-removed/</a><br></div><div><br></div><div>Anyway, I guess over the next year I'll have to rewrite all of my Python scripts in Objective-C and/or shell script, because the world's richest company can't be arsed to keep shipping scripting language support with the remains of its once-fine UNIX operating system. They're proud of the douchey alerts, too:<br></div><div><br></div><div><a rel="noopener noreferrer" href="https://twitter.com/mikeymikey/status/1401981286680461314">https://twitter.com/mikeymikey/status/1401981286680461314</a><br></div><div><br></div><div>TeX Live will have to start installing its own Perl, as well.<br></div><div><br></div><blockquote type="cite"><div>On Oct 26, 2021, at 9:05 AM, Bruno Voisin via tlu <tlu@tug.org> wrote:<br></div><div><br></div><div><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><blockquote class="" type="cite"><div>On 25 Oct 2021, at 21:18, Bruno Voisin <<a class="" href="mailto:bvoisin@icloud.com">bvoisin@icloud.com</a>> wrote:<br></div><div><br></div><div>In that case, then the warning when opening TLU is to tell that TLU uses Python 2 and Apple plans to remove Python 2 in a future release (to replace it with Python 3, or remove Python altogether, is unclear).<br></div><div><br></div><div>The fact is, for the moment it seems Python 2.7 is still provided (in /System/Library/Frameworks/Python.framework/Versions/2.7). So the warning can be safely ignored, I think.<br></div></blockquote><div><br></div><div><br></div><div>Summarizing some off-list discussion with Herb:<br></div><div class=""><br></div><div class=""><br></div><div class="">- The warning is<br></div><div class=""><br></div><div class=""><span><TLU Warning.png></span><br></div><div class=""><br></div><div class="">and is indeed about Python. When you click on the "Learn More..." button, you are brought to the page<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span><a class="" rel="noopener noreferrer" href="https://www.python.org/doc/sunset-python-2/">https://www.python.org/doc/sunset-python-2/</a><br></div><div class=""><br></div><div class="">about the obsolescence of Python 2.<br></div><div class=""><br></div><div class=""><br></div><div class="">- Adam has made sure (since version 1.13 I think, according to the Release Notes) that TLU runs fine with both Python 2 and 3. It seems to be (a catch by Herb) the shebang line<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>#!/usr/bin/python <br></div><div class=""><br></div><div class="">for example in /Applications/TeX/TeX Live Utility.app/Contents/Resources/update_check.py, or maybe<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>#!/usr/bin/env python<br></div><div class=""><br></div><div class="">in /Applications/TeX/TeX Live Utility.app/Contents/MacOS/parse_tlpdb.py, that calls the built-in macOS Python, currently Python 2.7. This triggers the above warning.<br></div><div class=""><br></div><div class=""><br></div><div class="">- Indeed, the built-in Python is 2.7. It lives in<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>/System/Library/Frameworks/Python.framework<br></div><div class=""><br></div><div class="">In Terminal (removing blank lines):<br></div><div class=""><br></div><div class=""><div><span style="white-space:pre" class="Apple-tab-span"></span>% python<br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>WARNING: Python 2.7 is not recommended. <br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>This version is included in macOS for compatibility with legacy software. <br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>Future versions of macOS will not include Python 2.7. <br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>Instead, it is recommended that you transition to using 'python3' from within Terminal.<br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>Python 2.7.18 (default, Oct  2 2021, 04:20:38) <br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>[GCC Apple LLVM 13.0.0 (clang-1300.0.29.1) [+internal-os, ptrauth-isa=deploymen on darwin<br></div></div><div class=""><br></div><div class="">- Python 3 is not built-in and comes with the Developer Tools. There are two ways to install the Apple version. If you run python3 in Terminal you get<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>% python3                  <br></div><div><span style="white-space:pre" class="Apple-tab-span"></span>xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.<br></div><div class=""><br></div><div class="">and at the same an application Install Command Line Developer Tools launches itself offering to install the command line developer tools, which include python3:<br></div><div class=""><br></div><div class=""><span><Python 3 Installation.png></span><br></div><div class=""><br></div><div class="">No authentication is required, only a Command Line Tools Licence Agreement. Afterwards<br></div><div class=""><br></div><div class=""><div><span style="white-space:pre" class="Apple-tab-span"></span>% python3<br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>Python 3.8.9 (default, Aug  3 2021, 19:21:54) <br></div><div><span style="white-space:pre" class="Apple-tab-span"> </span>[Clang 13.0.0 (clang-1300.0.29.3)] on darwin<br></div></div><div class=""><br></div><div class="">and Python 3 lives in<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework<br></div><div class=""><br></div><div class=""><br></div><div class="">- Alternatively, you may install Xcode from the App Store. In that event, Python 3 will live in<br></div><div class=""><br></div><div class=""><span style="white-space:pre" class="Apple-tab-span"></span>/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework<br></div><div class=""><br></div><div class=""><br></div><div class="">- It's unclear what will happen when Apple removes Python 2.7. One possibility is that /usr/bin/python will remain and be altered to point to python3, which either will have replaced Python 2.7 in the OS, or will need to be installed separately as above.<br></div><div class=""><br></div><div class=""><div>Another possibility is that the python command goes away and only python3 will be recognized by the OS, which (I imagine) would mean the .py scripts would need to test for the available python if any and use explicitly either python or python3 depending on the result.<br></div><div><br></div><div class=""><br></div><div class="">Maybe this doesn't make sense, I've never really used Python myself.<br></div><div class=""><br></div><div class="">Bruno<br></div><div class=""><br></div></div></div></blockquote><div><br></div></div><div><br></div></body></html>