On Fri, 12 Feb 2021 at 06:46, Richard Kimberly Heck <rikih...@lyx.org> wrote:
> On 2/11/21 11:19 PM, Thibaut Cuvelier wrote: > > On Thu, 11 Feb 2021 at 20:52, Thibaut Cuvelier <tcuvel...@lyx.org> wrote: > >> On Thu, 11 Feb 2021 at 20:05, José Abílio Matos <jama...@lyx.org> 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