Am 22.06.2019 um 15:47 schrieb José Abílio Matos:
> On Friday, 21 June 2019 14.41.40 WEST Jürgen Womser-Schütz wrote:
>> For me the Cmake build (Win 10) isn't working anymore: Python3 is not
>> found but is is installed and in the path.
>>
>> After successful compilation und running LyX I get on the LyX-console
>> the message:
>>
>> Looking for python 3.x ...
>> Examining C:/Program Files (x86)/Python37//python3.exe
>> Looking for python 2.x ...
>> Warning: No python v2.x or 3.x binary found.
>>
>> It seems to me that the reason is in the function "python23_call()",
>> module "os.cpp", in which a batch command-line is generated.
>> The command-line is the concatenation of the string "python3" and a
>> string "version_info", yielding:
>>
>>     python3 -c 'from __future__ import print_function;import sys;
>> print(sys.version_info[:2], end=\"\")'
>>
>> This command worked in PowerShell (on my system the result was (3,7)),
>> but not for the command console "cmd" (I got a syntax error).
>> For "cmd" I need to substitute the characters ' by the characters ".
>>
>> The problem for me is to change this for Windows and not to destroy LyX
>> for other operation systems
> OK. Let us try to find a solution that works in all environments. :-)
>
> python3 -c "from __future__ import print_function;import sys;
> print(sys.version_info[:2], end=\"\")"
>
> From the original case I have replaced the outer single quotes by double
> quotes.
>
> This works in bash on linux but fails on csh (C shell - actually tc shell).
>
> An equivalente versions is:
> python3 -c "from __future__ import print_function;import sys;
> print(sys.version_info[:2], end='')"
>
> The inner escaped double quotes were transformed in single quotes. This now
> works for bash and csh.
>
> Does this version works for cmd and PowerShell on windows?
>
> Best regards,

You are right! Your version

python3 -c "from __future__ import print_function;import sys;
print(sys.version_info[:2], end='')"

works for me.

Best regards and thanks for the help
Jürgen (JWS)

Reply via email to