From: Andrey Repin <anrdaemon@yandex.ru>
To: "Lemke, Michael SF/HZA-ZIC2" <lemkemch@schaeffler.com>,
cygwin@cygwin.com
Subject: Re: python sys.executable inconsistency if called from cmd
Date: Wed, 3 Feb 2021 18:27:48 +0300 [thread overview]
Message-ID: <399245376.20210203182748@yandex.ru> (raw)
In-Reply-To: <VI1PR03MB644670814A7A43C6934EBC93BEB49@VI1PR03MB6446.eurprd03.prod.outlook.com>
Greetings, Lemke, Michael SF/HZA-ZIC2!
> I don't know anything about python but want to use cygwin's
> python from nodejs with npm-gyp. The npm-gyp module is trying to
> find the python executable path from sys.executable and fails.
If that's true, then it should be fixed upstream.
> While investigating this I found this to me quite inconsistent
> behavior:
> cygwin> /bin/python3.6m.exe -c 'import sys; print(sys.executable);'
> /bin/python3.6m
> cygwin> python3.6m -c 'import sys; print(sys.executable);'
> /usr/bin/python3.6m
> cygwin> python3.6 -c 'import sys; print(sys.executable);'
> /usr/bin/python3.6
> cygwin> python3.6m.exe -c 'import sys; print(sys.executable);'
> /usr/bin/python3.6m
> cmd> c:/MyStuff/NCygwin64/bin/python3.6m.exe -c 'import sys; print(sys.executable);'
> /usr/bin/python3.6m
> cmd> rem add cygwin path to Windows:
> cmd> path %PATH%;c:\MYSTUFF\ncygwin64\bin
> cmd> python3.6m.exe -c 'import sys; print(sys.executable);'
> /c/MYSTUFF/ncygwin64/bin/python3.6m
> With CMD I'll never get an executable that actually works from cmd.
> Is this expected?
Yes. This is Cygwin, not Windows CMD.
> Is there a way around to make this work?
Yes, write scripts correctly, correctly translate paths.
See:
> FAQ: https://cygwin.com/faq/
> Documentation: https://cygwin.com/docs.html
Specifically see `man cygpath`.
--
With best regards,
Andrey Repin
Wednesday, February 3, 2021 18:25:18
Sorry for my terrible english...
next prev parent reply other threads:[~2021-02-03 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 14:35 Lemke, Michael SF/HZA-ZIC2
2021-02-03 15:27 ` Andrey Repin [this message]
2021-02-03 16:17 ` Lemke, Michael SF/HZA-ZIC2
2021-02-03 18:01 ` Marco Atzeri
2021-02-03 18:55 ` Andrey Repin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=399245376.20210203182748@yandex.ru \
--to=anrdaemon@yandex.ru \
--cc=cygwin@cygwin.com \
--cc=lemkemch@schaeffler.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).