Re: 2.4 alpha2 failing on windows 10

2021-02-14 Thread Richard Kimberly Heck
On 2/14/21 11:54 AM, Enrico Forestieri wrote:
> On Sun, Feb 14, 2021 at 11:15:21AM -0500, Richard Kimberly Heck wrote:
>> On 2/13/21 12:24 PM, Thibaut Cuvelier wrote:
>>> I've pushed this commit. I think LyX deserves a new alpha release with
>>> this fix, as the issue is really bad on Windows.
>> Yes, agreed. I'll do that today or tomorrow.
> Sorry for this inconvenience. I should have checked that '\e' is not
> a standard representation.

Well, it surprised me quite a bit.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-14 Thread Enrico Forestieri
On Sun, Feb 14, 2021 at 11:15:21AM -0500, Richard Kimberly Heck wrote:
> On 2/13/21 12:24 PM, Thibaut Cuvelier wrote:
> > I've pushed this commit. I think LyX deserves a new alpha release with
> > this fix, as the issue is really bad on Windows.
> 
> Yes, agreed. I'll do that today or tomorrow.

Sorry for this inconvenience. I should have checked that '\e' is not
a standard representation.

-- 
Enrico
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-14 Thread Richard Kimberly Heck
On 2/13/21 12:24 PM, Thibaut Cuvelier wrote:
> On Sat, 13 Feb 2021 at 05:40, Enrico Forestieri  > wrote:
>
> On Fri, Feb 12, 2021 at 07:31:46PM +, José Abílio Matos wrote:
> > On Friday, February 12, 2021 3:01:19 PM WET Thibaut Cuvelier wrote:
> > > Actually, it looks like \e is a GCC-only extension that is not
> > > well-understood by MSVC. The attached patch solves the problem
> for me by
> > > replacing \e by another nonprintable character.
> >
> > @Enrico what do you think about this change. I think that it
> should be
> > safe to apply.
>
> Yes, any nonprintable character will do.
>
>
> I've pushed this commit. I think LyX deserves a new alpha release with
> this fix, as the issue is really bad on Windows.

Yes, agreed. I'll do that today or tomorrow.

Riki



-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-13 Thread Thibaut Cuvelier
On Sat, 13 Feb 2021 at 05:40, Enrico Forestieri  wrote:

> On Fri, Feb 12, 2021 at 07:31:46PM +, José Abílio Matos wrote:
> > On Friday, February 12, 2021 3:01:19 PM WET Thibaut Cuvelier wrote:
> > > Actually, it looks like \e is a GCC-only extension that is not
> > > well-understood by MSVC. The attached patch solves the problem for me
> by
> > > replacing \e by another nonprintable character.
> >
> > @Enrico what do you think about this change. I think that it should be
> > safe to apply.
>
> Yes, any nonprintable character will do.
>

I've pushed this commit. I think LyX deserves a new alpha release with this
fix, as the issue is really bad on Windows.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread Enrico Forestieri
On Fri, Feb 12, 2021 at 07:31:46PM +, José Abílio Matos wrote:
> On Friday, February 12, 2021 3:01:19 PM WET Thibaut Cuvelier wrote:
> > Actually, it looks like \e is a GCC-only extension that is not
> > well-understood by MSVC. The attached patch solves the problem for me by
> > replacing \e by another nonprintable character.
> 
> @Enrico what do you think about this change. I think that it should be
> safe to apply.

Yes, any nonprintable character will do.

-- 
Enrico
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread José Abílio Matos
On Friday, February 12, 2021 3:01:19 PM WET Thibaut Cuvelier wrote:
> Actually, it looks like \e is a GCC-only extension that is not
> well-understood by MSVC. The attached patch solves the problem for me by
> replacing \e by another nonprintable character.

@Enrico what do you think about this change. I think that it should be safe to 
apply.

Best regards,
-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread Yu Jin
Am Do., 11. Feb. 2021 um 22:17 Uhr schrieb Thibaut Cuvelier <
tcuvel...@lyx.org>:

> On Thu, 11 Feb 2021 at 22:03, Yu Jin  wrote:
>
>> Am Do., 11. Feb. 2021 um 20:53 Uhr schrieb Thibaut Cuvelier <
>> tcuvel...@lyx.org>:
>>
>>> On Thu, 11 Feb 2021 at 20:05, Richard Kimberly Heck 
>>> wrote:
>>>
 On 2/11/21 11:02 AM, Yu Jin wrote:

 Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
 rikih...@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 <
> rikih...@lyx.org>:
>
>> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>>
>> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos 
>> 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?
>>
>
> Google is not always right: I don't have such a thing on my machines.
>

That doesn't mean that it doesn't exist. I have it installed (see
attached). (Don't know about python 2 but) when you install python 3, there
is an option to install python launcher.

-- 
Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread José Abílio Matos
On Friday, February 12, 2021 3:01:19 PM WET Thibaut Cuvelier wrote:
> Actually, it looks like \e is a GCC-only extension that is not
> well-understood by MSVC. The attached patch solves the problem for me by
> replacing \e by another nonprintable character.

You are right \e is a gcc extension:
https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C-Extensions
https://gcc.gnu.org/onlinedocs/gcc/Character-Escapes.html#Character-Escapes

-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread Thibaut Cuvelier
On Fri, 12 Feb 2021 at 15:50, Thibaut Cuvelier  wrote:

> On Fri, 12 Feb 2021 at 14:36, Thibaut Cuvelier  wrote:
>
>> On Fri, 12 Feb 2021 at 06:46, Richard Kimberly Heck 
>> wrote:
>>
>>> On 2/11/21 11:19 PM, Thibaut Cuvelier wrote:
>>>
>>> On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier 
>>> wrote:
>>>
 On Thu, 11 Feb 2021 at 20:05, José Abílio Matos 
 wrote:

> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
> > 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.
>
> Does Tools->Reconfigure works after adding the python path in the
> environment
> variable?
>
> I expect it to work. If it works that means that the configure.py
> changes are
> not the culprit.
>

 In my case, LyX can reconfigure once its PATH includes Python.

>>>
>>> I just checked that the situation is quite weird: in Tools > Preferences
>>> > Paths, I have "C:\Program Files\MiKTeX
>>> 2.9\miktex\bin\x64;$LyXDir\bin;$LyXDir\Python;$LyXDir\Python\Lib;$LyXDir\imagemagick;$LyXDir\ghostscript\bin",
>>> meaning that LyX should really consider its built-in version of Python, but
>>> (re)configure always fails if Python is not in the environment variable
>>> PATH does not contain Python before LyX starts.
>>>
>>> Does it fail if you try to reconfigure once LyX has launched? If so, can
>>> you please open View> Messages, then activate "Files Used By LyX", and
>>> reconfigure? I see, at the top
>>>
>>> 00:43:30.779: python3 -tt "/usr/local/share/lyx/configure.py"
>>> --binary-dir="/usr/local/bin/"
>>>
>>> That is the command LyX is using to try to reconfigure.
>>>
>>> Maybe we need also to check what the environment is at that point?
>>>
>>
>>  Here is what I get (a full LyX session with two calls to reconfigure):
>>
>> 14:30:52.923: Running configure...
>>>
>>> 14:30:56.919: python -tt "C:/Program Files/LyX
>>> 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX 2.4/bin/"
>>>
>>> 14:30:57.187: Python was not found; run without arguments to install
>>> from the Microsoft Store, or disable this shortcut from Settings > Manage
>>> App Execution Aliases.
>>>
>>> 14:30:57.187: Reloading configuration...Manually looking for python in
>>> PATH ...
>>>
>>> Examining "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/pythontex.exe"
>>>
>>> Examining
>>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>>>
>>> Examining
>>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>>>
>>> Examining
>>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>>>
>>> Examining
>>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>>>
>>> Warning: No python v2.x or 3.x binary found.
>>>
>>> LyX: reconfiguring user directory
>>>
>>> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
>>> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
>>> 2.4/bin/"' finished with exit code 9009
>>>
>>> LyX: Done!
>>>
>>> 14:31:06.641: (reconfigure)
>>>
>>> 14:31:21.627: Running configure...
>>>
>>> 14:31:21.766: python -tt "C:/Program Files/LyX
>>> 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX 2.4/bin/"
>>>
>>> 14:31:22.099: Python was not found; run without arguments to install
>>> from the Microsoft Store, or disable this shortcut from Settings > Manage
>>> App Execution Aliases.
>>>
>>> 14:31:22.103: Reloading configuration...LyX: reconfiguring user directory
>>>
>>> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
>>> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
>>> 2.4/bin/"' finished with exit code 9009
>>>
>>> LyX: Done!
>>>
>>> 14:31:23.273: (reconfigure)
>>>
>>> 14:32:30.743: (dialog-toggle progress)
>>>
>>
>> It really seems like LyX is getting the "standard" python.exe that just
>> shows a message and returns an error instead of its own Python (or any
>> other one from the path).
>>
>
> I can still reproduce the problem with master: the major difference is
> that I can use a debugger on that build. Digging in the call stack, it
> looks like the PATH environment variable is filled with strange things: the
> letter e is being replaced by $ for the part that LyX prepends! In
> environment.cpp, getEnv("PATH") returns the following string (truncated),
> when called from Tools > Reconfigure (find_python_binary in os.cpp):
>
> "C:\\Program Fil$s\\MiKT$X
>> 

Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread Thibaut Cuvelier
On Fri, 12 Feb 2021 at 14:36, Thibaut Cuvelier  wrote:

> On Fri, 12 Feb 2021 at 06:46, Richard Kimberly Heck 
> wrote:
>
>> On 2/11/21 11:19 PM, Thibaut Cuvelier wrote:
>>
>> On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier  wrote:
>>
>>> On Thu, 11 Feb 2021 at 20:05, José Abílio Matos  wrote:
>>>
 On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
 > 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.

 Does Tools->Reconfigure works after adding the python path in the
 environment
 variable?

 I expect it to work. If it works that means that the configure.py
 changes are
 not the culprit.

>>>
>>> In my case, LyX can reconfigure once its PATH includes Python.
>>>
>>
>> I just checked that the situation is quite weird: in Tools > Preferences
>> > Paths, I have "C:\Program Files\MiKTeX
>> 2.9\miktex\bin\x64;$LyXDir\bin;$LyXDir\Python;$LyXDir\Python\Lib;$LyXDir\imagemagick;$LyXDir\ghostscript\bin",
>> meaning that LyX should really consider its built-in version of Python, but
>> (re)configure always fails if Python is not in the environment variable
>> PATH does not contain Python before LyX starts.
>>
>> Does it fail if you try to reconfigure once LyX has launched? If so, can
>> you please open View> Messages, then activate "Files Used By LyX", and
>> reconfigure? I see, at the top
>>
>> 00:43:30.779: python3 -tt "/usr/local/share/lyx/configure.py"
>> --binary-dir="/usr/local/bin/"
>>
>> That is the command LyX is using to try to reconfigure.
>>
>> Maybe we need also to check what the environment is at that point?
>>
>
>  Here is what I get (a full LyX session with two calls to reconfigure):
>
> 14:30:52.923: Running configure...
>>
>> 14:30:56.919: python -tt "C:/Program Files/LyX
>> 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX 2.4/bin/"
>>
>> 14:30:57.187: Python was not found; run without arguments to install from
>> the Microsoft Store, or disable this shortcut from Settings > Manage App
>> Execution Aliases.
>>
>> 14:30:57.187: Reloading configuration...Manually looking for python in
>> PATH ...
>>
>> Examining "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/pythontex.exe"
>>
>> Examining
>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>>
>> Examining
>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>>
>> Examining
>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>>
>> Examining
>> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>>
>> Warning: No python v2.x or 3.x binary found.
>>
>> LyX: reconfiguring user directory
>>
>> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
>> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
>> 2.4/bin/"' finished with exit code 9009
>>
>> LyX: Done!
>>
>> 14:31:06.641: (reconfigure)
>>
>> 14:31:21.627: Running configure...
>>
>> 14:31:21.766: python -tt "C:/Program Files/LyX
>> 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX 2.4/bin/"
>>
>> 14:31:22.099: Python was not found; run without arguments to install from
>> the Microsoft Store, or disable this shortcut from Settings > Manage App
>> Execution Aliases.
>>
>> 14:31:22.103: Reloading configuration...LyX: reconfiguring user directory
>>
>> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
>> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
>> 2.4/bin/"' finished with exit code 9009
>>
>> LyX: Done!
>>
>> 14:31:23.273: (reconfigure)
>>
>> 14:32:30.743: (dialog-toggle progress)
>>
>
> It really seems like LyX is getting the "standard" python.exe that just
> shows a message and returns an error instead of its own Python (or any
> other one from the path).
>

I can still reproduce the problem with master: the major difference is that
I can use a debugger on that build. Digging in the call stack, it looks
like the PATH environment variable is filled with strange things: the
letter e is being replaced by $ for the part that LyX prepends! In
environment.cpp, getEnv("PATH") returns the following string (truncated),
when called from Tools > Reconfigure (find_python_binary in os.cpp):

"C:\\Program Fil$s\\MiKT$X
> 2.9\\mikt$x\\bin\\x64;D:\\Thibaut\\LyX\\cmak$-build-d$bug-visual-studio\\bin;D:\\Thibaut\\LyX\\cmak$-build-d$bug-visual-studio\\Python;D:\\Thibaut\\LyX\\cmak$-build-d$bug-visual-studio\\Python\\Lib;D:\\Thibaut\\LyX\\cmak$-build-d$bug-visual-studio\\imag$magick;D:\\Thibaut\\LyX\\cmak$-build-d$bug-visual-studio\\ghostscript\\bin;C:\\Program
> Files\\Common
> Files\\Oracle\\Java\\javapath;C:\\gurobi911\\win64\\bin;C:\\Program
> 

Re: 2.4 alpha2 failing on windows 10

2021-02-12 Thread Thibaut Cuvelier
On Fri, 12 Feb 2021 at 06:46, Richard Kimberly Heck 
wrote:

> On 2/11/21 11:19 PM, Thibaut Cuvelier wrote:
>
> On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier  wrote:
>
>> On Thu, 11 Feb 2021 at 20:05, José Abílio Matos  wrote:
>>
>>> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
>>> > 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.
>>>
>>> Does Tools->Reconfigure works after adding the python path in the
>>> environment
>>> variable?
>>>
>>> I expect it to work. If it works that means that the configure.py
>>> changes are
>>> not the culprit.
>>>
>>
>> In my case, LyX can reconfigure once its PATH includes Python.
>>
>
> I just checked that the situation is quite weird: in Tools > Preferences >
> Paths, I have "C:\Program Files\MiKTeX
> 2.9\miktex\bin\x64;$LyXDir\bin;$LyXDir\Python;$LyXDir\Python\Lib;$LyXDir\imagemagick;$LyXDir\ghostscript\bin",
> meaning that LyX should really consider its built-in version of Python, but
> (re)configure always fails if Python is not in the environment variable
> PATH does not contain Python before LyX starts.
>
> Does it fail if you try to reconfigure once LyX has launched? If so, can
> you please open View> Messages, then activate "Files Used By LyX", and
> reconfigure? I see, at the top
>
> 00:43:30.779: python3 -tt "/usr/local/share/lyx/configure.py"
> --binary-dir="/usr/local/bin/"
>
> That is the command LyX is using to try to reconfigure.
>
> Maybe we need also to check what the environment is at that point?
>

 Here is what I get (a full LyX session with two calls to reconfigure):

14:30:52.923: Running configure...
>
> 14:30:56.919: python -tt "C:/Program Files/LyX 2.4/Resources/configure.py"
> --binary-dir="C:/Program Files/LyX 2.4/bin/"
>
> 14:30:57.187: Python was not found; run without arguments to install from
> the Microsoft Store, or disable this shortcut from Settings > Manage App
> Execution Aliases.
>
> 14:30:57.187: Reloading configuration...Manually looking for python in
> PATH ...
>
> Examining "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/pythontex.exe"
>
> Examining "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>
> Examining
> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>
> Examining "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python.exe"
>
> Examining
> "C:/Users/Thibaut/AppData/Local/Microsoft/WindowsApps/python3.exe"
>
> Warning: No python v2.x or 3.x binary found.
>
> LyX: reconfiguring user directory
>
> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
> 2.4/bin/"' finished with exit code 9009
>
> LyX: Done!
>
> 14:31:06.641: (reconfigure)
>
> 14:31:21.627: Running configure...
>
> 14:31:21.766: python -tt "C:/Program Files/LyX 2.4/Resources/configure.py"
> --binary-dir="C:/Program Files/LyX 2.4/bin/"
>
> 14:31:22.099: Python was not found; run without arguments to install from
> the Microsoft Store, or disable this shortcut from Settings > Manage App
> Execution Aliases.
>
> 14:31:22.103: Reloading configuration...LyX: reconfiguring user directory
>
> support\Systemcall.cpp (291): Systemcall: 'python -tt "C:/Program
> Files/LyX 2.4/Resources/configure.py" --binary-dir="C:/Program Files/LyX
> 2.4/bin/"' finished with exit code 9009
>
> LyX: Done!
>
> 14:31:23.273: (reconfigure)
>
> 14:32:30.743: (dialog-toggle progress)
>

It really seems like LyX is getting the "standard" python.exe that just
shows a message and returns an error instead of its own Python (or any
other one from the path).
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Richard Kimberly Heck
On 2/11/21 11:19 PM, Thibaut Cuvelier wrote:
> On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier  > wrote:
>
> On Thu, 11 Feb 2021 at 20:05, José Abílio Matos  > wrote:
>
> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
> > 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.
>
> Does Tools->Reconfigure works after adding the python path in
> the environment
> variable?
>
> I expect it to work. If it works that means that the
> configure.py changes are
> not the culprit.
>
>
> In my case, LyX can reconfigure once its PATH includes Python.
>
>
> I just checked that the situation is quite weird: in Tools >
> Preferences > Paths, I have "C:\Program Files\MiKTeX
> 2.9\miktex\bin\x64;$LyXDir\bin;$LyXDir\Python;$LyXDir\Python\Lib;$LyXDir\imagemagick;$LyXDir\ghostscript\bin",
> meaning that LyX should really consider its built-in version of
> Python, but (re)configure always fails if Python is not in the
> environment variable PATH does not contain Python before LyX starts.

Does it fail if you try to reconfigure once LyX has launched? If so, can
you please open View> Messages, then activate "Files Used By LyX", and
reconfigure? I see, at the top

00:43:30.779: python3 -tt "/usr/local/share/lyx/configure.py"
--binary-dir="/usr/local/bin/"

That is the command LyX is using to try to reconfigure.

Maybe we need also to check what the environment is at that point?

Riki

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Thibaut Cuvelier
On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier  wrote:

> On Thu, 11 Feb 2021 at 20:05, José Abílio Matos  wrote:
>
>> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
>> > 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.
>>
>> Does Tools->Reconfigure works after adding the python path in the
>> environment
>> variable?
>>
>> I expect it to work. If it works that means that the configure.py changes
>> are
>> not the culprit.
>>
>
> In my case, LyX can reconfigure once its PATH includes Python.
>

I just checked that the situation is quite weird: in Tools > Preferences >
Paths, I have "C:\Program Files\MiKTeX
2.9\miktex\bin\x64;$LyXDir\bin;$LyXDir\Python;$LyXDir\Python\Lib;$LyXDir\imagemagick;$LyXDir\ghostscript\bin",
meaning that LyX should really consider its built-in version of Python, but
(re)configure always fails if Python is not in the environment variable
PATH does not contain Python before LyX starts.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Thibaut Cuvelier
On Thu, 11 Feb 2021 at 22:09, Richard Kimberly Heck 
wrote:

> On 2/11/21 4:04 PM, José Abílio Matos wrote:
> > On Thursday, February 11, 2021 7:53:36 PM WET Thibaut Cuvelier wrote:
> >> 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).
> > Since we require python to run maybe it would make sense to add the
> > information that comes from os::find_python to "Help -> About LyX".
> >
> > What do you think? (this is meant to every one not just Thibaut) :-)
>
> I think that's a good idea. I can do it later tonight unless someone
> beats me to it.
>
> We need a couple other fixes to the dialog, too, anyway.
>

+1 for the idea too. It might also be good to show all the versions of
anything (not purely TeX-based) that LyX might use and that has been
discovered by configure.py. It might also be useful to indicate which
version was chosen, i.e. bundled or no (e.g., the bundled Python or Perl).
For TeX stuff, maybe Tools > TeX Information is enough? I frankly have no
idea…
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Thibaut Cuvelier
On Thu, 11 Feb 2021 at 22:03, Yu Jin  wrote:

> Am Do., 11. Feb. 2021 um 20:53 Uhr schrieb Thibaut Cuvelier <
> tcuvel...@lyx.org>:
>
>> On Thu, 11 Feb 2021 at 20:05, Richard Kimberly Heck 
>> wrote:
>>
>>> On 2/11/21 11:02 AM, Yu Jin wrote:
>>>
>>> Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
>>> rikih...@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 <
 rikih...@lyx.org>:

> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>
> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos 
> 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?
>

Google is not always right: I don't have such a thing on my machines.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Richard Kimberly Heck

On 2/11/21 4:04 PM, José Abílio Matos wrote:

On Thursday, February 11, 2021 7:53:36 PM WET Thibaut Cuvelier wrote:

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

Since we require python to run maybe it would make sense to add the
information that comes from os::find_python to "Help -> About LyX".

What do you think? (this is meant to every one not just Thibaut) :-)


PS For now, I think enabling debug info for 'file' will show what Python 
is being called.


Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Richard Kimberly Heck

On 2/11/21 4:04 PM, José Abílio Matos wrote:

On Thursday, February 11, 2021 7:53:36 PM WET Thibaut Cuvelier wrote:

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

Since we require python to run maybe it would make sense to add the
information that comes from os::find_python to "Help -> About LyX".

What do you think? (this is meant to every one not just Thibaut) :-)


I think that's a good idea. I can do it later tonight unless someone 
beats me to it.


We need a couple other fixes to the dialog, too, anyway.

Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread José Abílio Matos
On Thursday, February 11, 2021 7:53:36 PM WET Thibaut Cuvelier wrote:
> 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).

Since we require python to run maybe it would make sense to add the 
information that comes from os::find_python to "Help -> About LyX".

What do you think? (this is meant to every one not just Thibaut) :-)

Best regards,
-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Yu Jin
Am Do., 11. Feb. 2021 um 20:53 Uhr schrieb Thibaut Cuvelier <
tcuvel...@lyx.org>:

> On Thu, 11 Feb 2021 at 20:05, Richard Kimberly Heck 
> wrote:
>
>> On 2/11/21 11:02 AM, Yu Jin wrote:
>>
>> Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
>> rikih...@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 <
>>> rikih...@lyx.org>:
>>>
 On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:

 On Wed, 10 Feb 2021 at 18:34, José Abílio Matos 
 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?
-- 
Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Yu Jin
Am Do., 11. Feb. 2021 um 20:05 Uhr schrieb José Abílio Matos <
jama...@lyx.org>:

> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
> > 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.
>
> Does Tools->Reconfigure works after adding the python path in the
> environment
> variable?
>
As written before, after adding, python is found, so the script actually
starts, but it does not find other binaries (ghostscript and imagemagick)
which are also in the path prefix.

>
> I expect it to work. If it works that means that the configure.py changes
> are
> not the culprit.
>
> Eugene, could it be some change in the windows installer between alpha 1
> and
> alpha 2?
>

There were no changes in the installer.

Again, imo the part which adds path prefix (see attachment) to the runtime
environment must be broken.
-- 
Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Thibaut Cuvelier
On Thu, 11 Feb 2021 at 20:05, Richard Kimberly Heck 
wrote:

> On 2/11/21 11:02 AM, Yu Jin wrote:
>
> Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
> rikih...@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 <
>> rikih...@lyx.org>:
>>
>>> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>>>
>>> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos  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).
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Thibaut Cuvelier
On Thu, 11 Feb 2021 at 20:05, José Abílio Matos  wrote:

> On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
> > 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.
>
> Does Tools->Reconfigure works after adding the python path in the
> environment
> variable?
>
> I expect it to work. If it works that means that the configure.py changes
> are
> not the culprit.
>

In my case, LyX can reconfigure once its PATH includes Python.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Richard Kimberly Heck

On 2/11/21 11:02 AM, Yu Jin wrote:
Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck 
mailto:rikih...@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
mailto:rikih...@lyx.org>>:

On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:

On Wed, 10 Feb 2021 at 18:34, José Abílio Matos
mailto:jama...@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.


Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread José Abílio Matos
On Thursday, February 11, 2021 4:02:19 PM WET Yu Jin wrote:
> 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.

Does Tools->Reconfigure works after adding the python path in the environment 
variable?

I expect it to work. If it works that means that the configure.py changes are 
not the culprit.

Eugene, could it be some change in the windows installer between alpha 1 and 
alpha 2?

Best regards,
-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-11 Thread Yu Jin
Am Do., 11. Feb. 2021 um 00:02 Uhr schrieb Richard Kimberly Heck <
rikih...@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 <
> rikih...@lyx.org>:
>
>> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>>
>> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos  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.
-- 
Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread Richard Kimberly Heck

On 2/10/21 4:28 PM, Yu Jin wrote:
Am Mi., 10. Feb. 2021 um 20:23 Uhr schrieb Richard Kimberly Heck 
mailto:rikih...@lyx.org>>:


On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:

On Wed, 10 Feb 2021 at 18:34, José Abílio Matos mailto:jama...@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.

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread Yu Jin
Am Mi., 10. Feb. 2021 um 20:23 Uhr schrieb Richard Kimberly Heck <
rikih...@lyx.org>:

> On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
>
> On Wed, 10 Feb 2021 at 18:34, José Abílio Matos  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).
-- 
Eugene
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread Richard Kimberly Heck

On 2/10/21 2:14 PM, Thibaut Cuvelier wrote:
On Wed, 10 Feb 2021 at 18:34, José Abílio Matos > 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;".


Riki



-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread Thibaut Cuvelier
On Wed, 10 Feb 2021 at 18:34, José Abílio Matos  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).
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread José Abílio Matos
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... :-(

-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread Thibaut Cuvelier
On Wed, 10 Feb 2021 at 08:50, Pavel Sanda  wrote:

> On Tue, Feb 09, 2021 at 06:14:10PM +1300, Andrew Parsloe wrote:
> > I've twice downloaded the 64 bit alpha2 installer for windows and
> installed
> > it. However when I try to open a document in it I get a series of errors
> > starting with unable to find the article layout, then unable to read cite
> > engine basic, then failures of both lyx2lyx and tex2lyx scripts. Trying
> to
> > reconfigure also fails. When I look at Help > About LyX I see
>
> I just got similar report from another win user.
> My guess it that configure refactoring broke something on windows.
>
> Thibaut, can you succesfully install & run alpha2?
>

I can reproduce the same problem as Andrew with a fresh 64-bit LyX 2.4.
@José : reconfiguring LyX does not solve the problem. It really looks like
it cannot find Python.
Is there any way to get the console output? I think the answer lies in
STDERR, somewhere…

By the way, would it be possible for the installer to add the version name
in the shortcut for the Start menu? Right now, only the folder with the
shortcut has the version, but this information is lost as soon as you
search in the menu.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-10 Thread José Abílio Matos
On Tuesday, February 9, 2021 10:09:27 AM WET Andrew Parsloe wrote:
> I've attached the output from the messages pane (with All debug messages
> set) resulting from when I click on the new document icon. (If this is
> not sufficient, then Yes, I can run LyX from the command line. What
> arguments should be used?)
> 
> Andrew

Hi Andrew,
  do the problems go away if you run/select: Tools->Reconfigure

Best regards,
-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-09 Thread Pavel Sanda
On Tue, Feb 09, 2021 at 06:14:10PM +1300, Andrew Parsloe wrote:
> I've twice downloaded the 64 bit alpha2 installer for windows and installed
> it. However when I try to open a document in it I get a series of errors
> starting with unable to find the article layout, then unable to read cite
> engine basic, then failures of both lyx2lyx and tex2lyx scripts. Trying to
> reconfigure also fails. When I look at Help > About LyX I see

I just got similar report from another win user.
My guess it that configure refactoring broke something on windows.

Thibaut, can you succesfully install & run alpha2?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: 2.4 alpha2 failing on windows 10

2021-02-09 Thread Andrew Parsloe

On 9/02/2021 6:31 pm, Richard Kimberly Heck wrote:

On 2/9/21 12:14 AM, Andrew Parsloe wrote:

I've twice downloaded the 64 bit alpha2 installer for windows and
installed it. However when I try to open a document in it I get a
series of errors starting with unable to find the article layout, then
unable to read cite engine basic, then failures of both lyx2lyx and
tex2lyx scripts. Trying to reconfigure also fails. When I look at Help

About LyX I see

Version 2.4.0dev (Monday, 28 December 2020)

Is this right? I've reverted to alpha1 which I see has the same
version date:

Version 2.4.0-alpha1 (Monday, 28 December 2020)


I didn't update the version date. I should have.

The errors sound like python errors. Can you run from a terminal?

Riki


I've attached the output from the messages pane (with All debug messages 
set) resulting from when I click on the new document icon. (If this is 
not sufficient, then Yes, I can run LyX from the command line. What 
arguments should be used?)


Andrew

frontends\qt\GuiApplication.cpp (1655): cmd:  action: 3 [buffer-new]  arg: '' 
x: 0 y: 0
BufferParams.cpp (2529): setBaseClass: article
Error: Document class not found

The layout file:
article
could not be found. A default textclass with default
layouts will be used. LyX will not be able to produce
correct output.
frontends\qt\GuiApplication.cpp (714): Missing translation for `OK'
frontends\qt\GuiView.cpp (239): widget pixel ratio: 1 splash pixel ratio: 1 
paint pixmap: 400x250@317+44
frontends\qt\GuiView.cpp (239): widget pixel ratio: 1 splash pixel ratio: 1 
paint pixmap: 400x250@317+44
frontends\qt\GuiView.cpp (1005): GuiView::setFocus()020B6DAB80A0
frontends\qt\GuiView.cpp (1022): GuiView::focusInEvent()020B6DAB80A0
support\TempFile.cpp (35): Temporary file in 
C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/basicXX.layout
support\TempFile.cpp (38): Temporary file 
`C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/basicCLbOCI.layout' 
created.
TextClass.cpp (335): support/os_win32.cpp (329):  
[~/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/basicCLbOCI.layout]->>[~\AppData\Local\Temp\lyx_tmpdir.nuKJvhzylCem\basicCLbOCI.layout]
Reading textclass: 
~\AppData\Local\Temp\lyx_tmpdir.nuKJvhzylCem\basicCLbOCI.layout
TextClass.cpp (150): Reading style Plain Layout
Format.cpp (370): filetools(getFormatFromContents)
File type not recognised before EOF!
Format.cpp (377): filetools(getFormatFromContents)
Couldn't find a known format!
Lexer.cpp (254): lyxlex: UNcompressed
Lexer.cpp (333): Comment read: `35 This layout is automatically generated'
Lexer.cpp (333): Comment read: `35 \DeclareLaTeXClass{article}'
TextClass.cpp (335): Reading input file: [layouts/stdclass.inc]
Format.cpp (377): filetools(getFormatFromContents)
Couldn't find a known format!
Lexer.cpp (254): lyxlex: UNcompressed
Lexer.cpp (333): Comment read: `35 Standard textclass definition file. Taken 
from initial LyX source code'
Lexer.cpp (333): Comment read: `35 Author : Matthias Ettrich 
'
Lexer.cpp (333): Comment read: `35 Transposed by Pascal André 
'
Lexer.cpp (333): Comment read: `35 Heavily modifed and enhanced by several 
developers.'
Lexer.cpp (333): Comment read: `35 This is a base layout which is designed to 
be included from other'
Lexer.cpp (333): Comment read: `35 ``standard'' layouts, like article and 
friends.'
TextClass.cpp (348): Finished reading input file: [layouts/stdclass.inc]
TextClass.cpp (292): Converting layout file to 92
support\TempFile.cpp (35): Temporary file in 
C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/convertXX.layout
support\TempFile.cpp (38): Temporary file 
`C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/convertOqVUFl.layout'
 created.
TextClass.cpp (89): Running `python -tt "C:/Program Files/LyX 
2.4/Resources/scripts/layout2layout.py" -t 92 "C:/Program Files/LyX 
2.4/Resources/layouts/stdclass.inc" 
"C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/convertOqVUFl.layout"'
support\filetools.cpp (1067): Running: python -tt "C:/Program Files/LyX 
2.4/Resources/scripts/layout2layout.py" -t 92 "C:/Program Files/LyX 
2.4/Resources/layouts/stdclass.inc" 
"C:/Users/ajpar/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/convertOqVUFl.layout"
TextClass.cpp (94): Conversion of layout with layout2layout.py has failed.
TextClass.cpp (363): Unable to convert C:/Program Files/LyX 
2.4/Resources/layouts/stdclass.inc to format 92
LyX: Error reading input file: C:/Program Files/LyX 
2.4/Resources/layouts/stdclass.inc [around line 5 of file support/os_win32.cpp 
(329):  
[~/AppData/Local/Temp/lyx_tmpdir.nuKJvhzylCem/basicCLbOCI.layout]->>[~\AppData\Local\Temp\lyx_tmpdir.nuKJvhzylCem\basicCLbOCI.layout]
~\AppData\Local\Temp\lyx_tmpdir.nuKJvhzylCem\basicCLbOCI.layout current token: 
'stdclass.inc' context: '']
TextClass.cpp (348): support/os_win32.cpp (329):  

Re: 2.4 alpha2 failing on windows 10

2021-02-08 Thread Richard Kimberly Heck
On 2/9/21 12:14 AM, Andrew Parsloe wrote:
>
> I've twice downloaded the 64 bit alpha2 installer for windows and
> installed it. However when I try to open a document in it I get a
> series of errors starting with unable to find the article layout, then
> unable to read cite engine basic, then failures of both lyx2lyx and
> tex2lyx scripts. Trying to reconfigure also fails. When I look at Help
> > About LyX I see
>
> Version 2.4.0dev (Monday, 28 December 2020)
>
> Is this right? I've reverted to alpha1 which I see has the same
> version date:
>
> Version 2.4.0-alpha1 (Monday, 28 December 2020)
>
I didn't update the version date. I should have.

The errors sound like python errors. Can you run from a terminal?

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel