<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><blockquote type="cite" class="">On 25 Oct 2021, at 21:18, Bruno Voisin <<a href="mailto:bvoisin@icloud.com" class="">bvoisin@icloud.com</a>> wrote:<br class=""><br class="">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 class=""><br class="">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 class=""></blockquote><br class=""><br class="">Summarizing some off-list discussion with Herb:<div class=""><br class=""></div><div class=""><br class=""></div><div class="">- The warning is</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="AF3D2209-8F81-479C-B68C-628615B528C5" width="372" height="404" src="cid:B3897097-5D46-43EB-BE2A-278374AA47DF" class=""></div><div class=""><br class=""></div><div class="">and is indeed about Python. When you click on the "Learn More..." button, you are brought to the page</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.python.org/doc/sunset-python-2/" class="">https://www.python.org/doc/sunset-python-2/</a></div><div class=""><br class=""></div><div class="">about the obsolescence of Python 2.</div><div class=""><br class=""></div><div class=""><br class=""></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</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>#!/usr/bin/python </div><div class=""><br class=""></div><div class="">for example in /Applications/TeX/TeX Live Utility.app/Contents/Resources/update_check.py, or maybe</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>#!/usr/bin/env python</div><div class=""><br class=""></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.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">- Indeed, the built-in Python is 2.7. It lives in</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/System/Library/Frameworks/Python.framework</div><div class=""><br class=""></div><div class="">In Terminal (removing blank lines):</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>% python<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>WARNING: Python 2.7 is not recommended. <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>This version is included in macOS for compatibility with legacy software. <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Future versions of macOS will not include Python 2.7. <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Instead, it is recommended that you transition to using 'python3' from within Terminal.<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Python 2.7.18 (default, Oct 2 2021, 04:20:38) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>[GCC Apple LLVM 13.0.0 (clang-1300.0.29.1) [+internal-os, ptrauth-isa=deploymen on darwin<br class=""><br class=""></div><div class=""><br class=""></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</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>% python3 </div><span class="Apple-tab-span" style="white-space:pre"> </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.<div class=""><br class=""></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:</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="3E1D3D76-486B-4A39-85D0-02B711962824" width="573" height="307" src="cid:2FB9ED15-DD1F-44EF-ADD2-46BC4A84E87A" class=""></div><div class=""><br class=""></div><div class="">No authentication is required, only a Command Line Tools Licence Agreement. Afterwards</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>% python3<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Python 3.8.9 (default, Aug 3 2021, 19:21:54) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>[Clang 13.0.0 (clang-1300.0.29.3)] on darwin</div><div class=""><br class=""></div><div class="">and Python 3 lives in</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">- Alternatively, you may install Xcode from the App Store. In that event, Python 3 will live in</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework</div><div class=""><br class=""></div><div class=""><br class=""></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.</div><div class=""><br class=""></div><div class="">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 class=""><br class=""><div class=""><br class=""></div><div class="">Maybe this doesn't make sense, I've never really used Python myself.</div><div class=""><br class=""></div><div class="">Bruno</div><div class=""><br class=""></div></div></body></html>