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

José Abílio Matos jamatos at lyx.org
Tue Jan 4 08:27:10 UTC 2022


On Tuesday, 4 January 2022 07.16.52 WET Stephan Witt wrote:
> Interestingly on my system the python3 is detected only if I install the
> Python package from python.org. The python3 in /usr/bin is not tried?
> Sorry, I didn’t read the code yet.

It should according to the code in support/os.cpp.

The logic is simple and follows some guidelines from python.org.
For posix systems it first tries to see if "python3" can be found. If not try 
to run "python2" and if that does not work then returns "python".

What do you see in Help -> About LyX?

In my case I see "Python detected: python3 -tt".


The code can be made more complete.
E.g. previously we searched for python3* and python2* eventually I think that 
we can go back to something related. Instead of returning the first python 
that satisfies the requirement (minimum version) it should return the most 
recent version available (the best).

My use case is e.g. Red Hat Enterprise Linux (and related). /usr/bin/python3 
will point to the system python yet there could be available other more recent 
versions.

This is similar to the compiler available, e.g. the default compiler in RHEL 7 
default compiler is 4.7.x that is unable to compile LyX. Yet using devtools it 
is possible to install gcc-9 and that is more than capable to compile LyX.

The same applies to the python versions available there. The minimum python 
version that we support is python 3.5 released more than 6 years ago that it 
has no longer any security fixes for more than 1 year.

> > Probably the case you want to can be best done through documentation, no?
> 
> Yes, at first this is the best option probably.
> 
> My question for the future is how to act on next move of Apple. Neither I
> know when it will happen nor I know what happens. They announced to remove
> the preinstalled python altogether. ATM they provide python3 as wrapper.
> It’s asking the user to download and install the Command Line Developer
> Tools from Apple instead of doing anything useful. The exit status is 1.
> 
> Currently LyX is using python (python2) and the warning info pops up once:
> „LyX needs to be updated“. Obviously this is wrong now. Python3 needs to be
> installed instead.
> 
> So I’ll have to investigate further.
> 
> Stephan

Thank you. :-)
-- 
José Abílio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220104/8f24b675/attachment-0001.html>


More information about the lyx-devel mailing list