[RFC] Python related system prompt "Lyx must be updated" on macOS

Stephan Witt st.witt at gmx.net
Tue Dec 28 12:33:57 UTC 2021


Am 27.12.2021 um 18:37 schrieb Dr Eberhard Lisse <nospam at lisse.NA <mailto:nospam at lisse.NA>>:
> As per our personal conversation, I have seen this too, over the
> weekend.
> 
> The window offers two choices one (something like) "Learn more...", the
> other "ok".
> 
> If you click on "Learn more..." it takes you to
> 
> 	https://www.python.org/doc/sunset-python-2 <https://www.python.org/doc/sunset-python-2>
> 
> Can it be that this is caused by something like
> 
> 	#!/usr/bin/python
> 
> instead of
> 
> 	#!/usr/bin/env python
> 
> the former will, in my case use the Mac Monterey python 2.7, the latter
> Homebrew's python 3.9.

Hi all,

best wishes for 2022 first.

I’ve installed the macOS Monterey in a VM now. This makes it possible to test the LyX package on it and revert all changes it makes easily.

First the facts: it is indeed the python 2.7 invocation triggering the mentioned warning.
=======================
"LyX" needs to be updated
This app will not work with future versions of macOS and needs to be updated to improve compatibility. Contact the developer for more information.

=======================

This is announced here:
https://developer.apple.com/documentation/macos-release-notes/macos-12_0_1-release-notes <https://developer.apple.com/documentation/macos-release-notes/macos-12_0_1-release-notes>

But it’s not that easy to avoid that warning because python3 is not available by default. I tried to use it instead of python and this leads to another prompt:

=======================
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.

=======================

The Catalina release notes (2019) mentioned python as an obsolete script language. That means, Apple may stop providing them w/o additional package installation.
https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes <https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes>
"Scripting Language Runtimes Deprecations
• Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
• Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run python3 from within Terminal. (51097165)“

Now with Monterey we have reached the first stage of escalation. python 2.7 is obsolete since 2020 and macOS warns the user about the fact LyX is using it once.

But there is no alternative provided w/o additional package installation. One has to install python 3 from Apple developer tools or some other site.

Second the conclusion:

The LyX tasks here are IMO:
1. Assure the detected python3 is used consequently. This is not the case ATM.
2. Document the meaning of the prompts the LyX user is seeing on Monterey.
3. Provide a working python3 or give appropriate feedback on first start about users option to install python3.

AFAIK, José Abílio is working on a solution for 1. I’m able to help with the Mac part of the problem.

Regarding the point 3 - Apples recommendation to bundle python with LyX (49764202) - I’m not sure if this is a real option. 
The Windows package contains python, IMO. So it is possible. But is it clever?
I don’t like the solution to point the user to homebrew or macports to install python. Too much terminal work, IMO.

What do others think about the situation?

BR, Stephan

> On 2021-12-17 08:24 , Stephan Witt wrote:
>> Am 17.12.2021 um 06:57 schrieb Daniel <xracoonx at gmx.de <mailto:xracoonx at gmx.de>>:
>>> On 2021-12-16 22:16, Stephan Witt wrote:
>>>> Am 16.12.2021 um 09:56 schrieb Murat Yildizoglu via lyx-users <lyx-users at lists.lyx.org <mailto:lyx-users at lists.lyx.org>>:
> [...]
>>>>>> ""LyX" needs to be updated
>>>>>> This app will not work with future versions of macOS and needs to
>>>>>> be updated to improve compatibility.  Contact the developer for
>>>>>> more information.”
>>>>>> 
> [...]
>>>> that’s probably because of the LyX-2.3.6.2 package is pure Intel
>>>> code and the friendly OS wants to warn you about the fact the Apple
>>>> company is on the way to drop the support for the Intel CPUs.
>>> 
>>> Searching on the wen for the warning, I've only found evidence for
>>> the warning being triggered by the python version.  What makes you
>>> think that this is not the case?
> [...]
>> I didn’t say it’s not the case.  I said it’s probably because of the
>> CPU architecture.  Maybe I’m wrong.
>> I remember to see the very same warning with macOS High Sierra 10.13.4
>> for programs using 32bit Intel CPU code.
> [...]
> 
> -- 
> lyx-devel mailing list
> lyx-devel at lists.lyx.org <mailto:lyx-devel at lists.lyx.org>
> http://lists.lyx.org/mailman/listinfo/lyx-devel <http://lists.lyx.org/mailman/listinfo/lyx-devel>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211228/c165c109/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2021-12-27 um 19.16.54.png
Type: image/png
Size: 72665 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211228/c165c109/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2021-12-28 um 11.50.58.png
Type: image/png
Size: 203274 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211228/c165c109/attachment-0003.png>


More information about the lyx-devel mailing list