When resolving the path of the Python executable for a subprocess call, the sys.prefix can be different from the one that would be used when not resolving it. Python Virtual Environments work by relying on the module search paths being determined by the sys.prefix . Thus in the default case, in which the Python executable of the virtual environment is just a symbolic link to the system's executable, the resolving of the path will cause the wrong environment to be used (aka one in which anasymod might not even be installed).
Thus it would be nice if either Python executables could be special-cased for this, or the call to get_full_path (used also from within the which function inside files.py) can be omitted in respective use-cases.
When resolving the path of the Python executable for a subprocess call, the
sys.prefixcan be different from the one that would be used when not resolving it. Python Virtual Environments work by relying on the module search paths being determined by thesys.prefix. Thus in the default case, in which the Python executable of the virtual environment is just a symbolic link to the system's executable, the resolving of the path will cause the wrong environment to be used (aka one in which anasymod might not even be installed).Thus it would be nice if either Python executables could be special-cased for this, or the call to
get_full_path(used also from within thewhichfunction insidefiles.py) can be omitted in respective use-cases.