You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If I have a .mise.toml, say in folder ~/dev/project1 file that defines a python venv with
[env]
_.python.venv = '.venv'
and then have another .mise.toml in some subfolder of ~/dev/project1, say ~/dev/project1/src/notebooks that also defines a venv, then there are a few weird behaviors:
I cannot easily create a venv with the specified python version directly, because the venv of the parent folder is still active
So python -m venv .venv would actually create the venv using the Python binary from the parent venv
If I manage to correctly do (1), e.g. using the full path to the correct python version, then, when the new venv is activated, the PATH is not correct.
I have the bin of the venv of the parent folder before the bin of the current venv, so actually the wrong python binaries come first.
I know this is a bit of a weird edge case, but I have an actual use case for it.
To Reproduce
Described above: create two .mise.tomls specifying a Python venv in two nested folders.
Enter the lower folder.
Investigate $PATH
Expected behavior
About 1.: Actually, I would expect the parent venv to not be active when another venv is specified in .mise.toml, but doesn't exist.
So that if I am in the nested folder, python would refer to the python version specified in tools, and not the parent venv
(This might need a bit more thought / discussion)
About 2.: Here I'm more confident. If the nested venv gets activated, the parent venv should not be on the path anymore at all.
It definitely should not come before the nested venv.
Describe the bug
If I have a
.mise.toml
, say in folder~/dev/project1
file that defines a python venv withand then have another
.mise.toml
in some subfolder of~/dev/project1
, say~/dev/project1/src/notebooks
that also defines a venv, then there are a few weird behaviors:So
python -m venv .venv
would actually create the venv using the Python binary from the parent venvI have the
bin
of the venv of the parent folder before thebin
of the current venv, so actually the wrong python binaries come first.I know this is a bit of a weird edge case, but I have an actual use case for it.
To Reproduce
Described above: create two
.mise.toml
s specifying a Python venv in two nested folders.Enter the lower folder.
Investigate
$PATH
Expected behavior
About 1.: Actually, I would expect the parent venv to not be active when another venv is specified in
.mise.toml
, but doesn't exist.So that if I am in the nested folder,
python
would refer to the python version specified in tools, and not the parent venv(This might need a bit more thought / discussion)
About 2.: Here I'm more confident. If the nested venv gets activated, the parent venv should not be on the path anymore at all.
It definitely should not come before the nested venv.
mise doctor
outputThe text was updated successfully, but these errors were encountered: