2.4 alpha2 failing on windows 10

Yu Jin yu_jin at lyx.org
Thu Feb 11 21:03:24 UTC 2021

Am Do., 11. Feb. 2021 um 20:53 Uhr schrieb Thibaut Cuvelier <
tcuvelier at lyx.org>:

> On Thu, 11 Feb 2021 at 20:05, Richard Kimberly Heck <rikiheck at lyx.org>
> wrote:
>> On 2/11/21 11:02 AM, Yu Jin wrote:
>> Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
>> rikiheck at lyx.org>:
>>> On 2/10/21 4:28 PM, Yu Jin wrote:
>>> Am Mi., 10. Feb. 2021 um 20:23 Uhr schrieb Richard Kimberly Heck <
>>> rikiheck at lyx.org>:
>>>> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>>>> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos <jamatos at lyx.org>
>>>> wrote:
>>>>> On Wednesday, February 10, 2021 12:48:17 PM WET Thibaut Cuvelier wrote:
>>>>> > @José : reconfiguring LyX does not solve the problem. It really
>>>>> looks like
>>>>> > it cannot find Python.
>>>>> We did not change the python detection code since alpha-1... :-(
>>>> However, this must be the cause of the problems. I just tried adding
>>>> Python to the PATH environment variable, and everything worked perfectly.
>>>> Maybe LyX is tricked in some way by the python.exe that Microsoft puts
>>>> in the PATH? (It's not a real Python, just something that tells you how to
>>>> install it.) With this, you can start "a Python executable", but it will
>>>> not execute any script (I believe it always returns an error code).
>>>> That may be. Where do we record what Python we found?
>>>> If so, then the solution would be to try running some simple Python
>>>> file using whatever we find and see if that works. E.g. run the program
>>>> "1;".
>>> I have contributed some lines to python recognition on windows (
>>> https://www.lyx.org/trac/ticket/11712): But because of what was written
>>> by Thibaut (adding Python to PATH), it  looks to me that the failure is not
>>> in this function but in rather LyX failing to add path prefix. I can also
>>> reproduce this btw. I have checked the path prefix in the settings, all is
>>> done right there. But even if I add python dir to PATH, it then will not
>>> find other dependencies (imagemagik and ghostscript).
>>> I would try reverting all the changes to configure.py since alpha 1 and
>>> see if that fixes the problem. We did not get this report with alpha 1.
>>> These are:
>>> f7beed1e
>>> e95513c8
>>> 9d4ffac7
>>> e3fe4d65
>>> daa6f143
>>> c0fe2522
>>> af49df00
>>> 738dccbf
>>> If that helps, then add them back one at a time and find the culprit.
>> Will be pointless imo, it's not the script's fault that python is not
>> found. The fault is to be searched in the part of code which adds the
>> prefix path to the environment, which part would that be?
>> After all when installing, the installer adds the prefix path to its
>> environment too on runtime while installing and then calls the script, it
>> is successful then.
>> I would guess it is os::find_python_binary. But it has not been touched
>> in a long time.
> It's highly likely that it does. On Windows, the first thing this function
> checks is `py -3`, but I haven't seen any py binary in a long time
> (although I've been using the Anaconda Python distribution for quite some
> time).
py is py.exe, which is the python launcher on windows, ask google. How can
it be broken if it does find python after adding the python dir to PATH?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210211/d9780035/attachment.html>

More information about the lyx-devel mailing list