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

Stephan Witt st.witt at gmx.net
Fri Dec 31 13:03:57 UTC 2021


Am 29.12.2021 um 11:38 schrieb Stephan Witt <st.witt at gmx.net>:
> 
> Am 28.12.2021 um 13:55 schrieb José Abílio Matos <jamatos at lyx.org>:
>> 
>> On Tuesday, 28 December 2021 12.33.57 WET Stephan Witt wrote:
>>> 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.
>> 
>> I am not working on 1, the issue that I am working is a bit different, although related.
> 
> I referred to your proposal to consequently use the detected python version in our scripts.
> 
> ATM on Mac with python3 installed there are hardcoded calls of python e.g. in configure.py
> or - as you’ve pointed out - in the generated converter calls triggering the warning
> „LyX“ needs to be updated we want to avoid.

With latest changes to configure.py LyX is using python3 exclusively on first configuration run.
(as of commit 77670bc9983392e32abb1cec236e5741b4d8c84b)

Now I have two options to get the rest of python2 calls eliminated:
1. the replacement of the hard coded „python“ RC configuration entries with $${python} (your proposal) or
2. the drop-in of a python wrapper script for the Mac package. This script may check for python3
and start this instead of the system python (which is python2 and should be avoided).

The implementation of option 1 makes option 2 superfluous and is better. So I’ll see how you proceed.

BTW, did you ever check how LyX behaves on a system w/o any python interpreter installed?

I’m curious how difficult it would be to ignore python2 and present a message box for users to tell them how to get a python3 interpreter.

BR, Stephan


More information about the lyx-devel mailing list