It might be the case that I'm misunderstanding the JUPYTER_PREFER_ENV_PATH. It is a flag that gets set when in virtualenvs, for the other paths.py part of the work. This seems unrelated to "OS PATH" style stuff. However, it is the case that I want the script directory (the one found via sysconfig.get_path("scripts")) to be the preferred path for subcommand execution.
By adding these lines to my jupyter-core, my issues went away. I was now no longer getting shorted out by the wrong scripts / shims from pyenv. (I think it's a separate issue that the shim was resolving incorrectly to nothing)
Not actually a suggested PR -- I suspect that there's other work here.
Opening this as a fix for the issue https://github.com/jupyter/jupyter_core/issues/339
It might be the case that I'm misunderstanding the
JUPYTER_PREFER_ENV_PATH
. It is a flag that gets set when in virtualenvs, for the otherpaths.py
part of the work. This seems unrelated to "OS PATH" style stuff. However, it is the case that I want the script directory (the one found viasysconfig.get_path("scripts")
) to be the preferred path for subcommand execution.By adding these lines to my jupyter-core, my issues went away. I was now no longer getting shorted out by the wrong scripts / shims from pyenv. (I think it's a separate issue that the shim was resolving incorrectly to nothing)