Alexandros Karypidis added the comment:
My suggestion to gradually fall back from most specific to least specific
version, was an attempt to reconcile the input from various viewpoints.
I think that ideally the behaviour should be as close to UNIX as possible. This
means that it should just
Alexandros Karypidis added the comment:
I think this situation is not ideal and the limitation seems artificial.
If I understand correctly, there are two parameters that govern the behaviour
of the python launcher:
1) Is the shebang using /usr/bin/env or not?
2) IS the shebang specifying
Alexandros Karypidis added the comment:
As confirmed by debug information when setting PYLAUNCH_DEBUG=1, the shebang
seems to be ignored when using '#!//usr/bin/env python3' but works fine when
using '#!//usr/bin/env python'.
This is with '#!//usr/bin/env python' (proper
Alexandros Karypidis added the comment:
Forgot the simple script:
#!/usr/bin/env python3
import os, sys, platform
print('EXECUTABLE: ' + sys.executable)
print('PREFIX: ' + sys.prefix)
print('BASE PREFIX: ' + sys.base_prefix)
--
___
Python
New submission from Alexandros Karypidis :
When you activate a venv on Windows and use a shebang with a major verion
qualifier, the python launcer does not properly detect that a venv is active
and uses the system installation instead.
The incorrect behavior is documented in this SO question