Alexander P added the comment:
Well, project_base (which is what sys.executable is used for) is used only
during build (i. e. python_build is True), if I understand it correctly.
Normally, sys.prefix and sys.exec_prefix are used for all the paths.
Also, project_base can be explicitly set
New submission from Alexander P:
For example, Jython 2.7. When we try to execute `jython-standalone -m pip`,
distutils.sysconfig tries to parse sys.executable as a path and obviously fails:
Traceback (most recent call last):
File "/home/ale/dev/3toj/jython-standalone-2.7.0.ja