-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add python
option to _.python.venv
#1721
Comments
wait is this accurate?
assuming you did |
@jdx This is what I observe with 2024.11.37 so yes it seems a local tool.python disables all global pythons, where I would naively expect it to take precedence over globally defined ones. $ mise use -g python@3.13 python@3.12 python@3.11 python@3.10 python@3.9 python@3.8 python@3.7 python@3.6 python@2.7
$ mise list
Tool Version Config Source Requested
python 2.7.18 ~/.config/mise/config.toml 2.7
python 3.6.15 ~/.config/mise/config.toml 3.6
python 3.7.17 ~/.config/mise/config.toml 3.7
python 3.8.20 ~/.config/mise/config.toml 3.8
python 3.9.20 ~/.config/mise/config.toml 3.9
python 3.10.15 ~/.config/mise/config.toml 3.10
python 3.11.10 ~/.config/mise/config.toml 3.11
python 3.12.7 ~/.config/mise/config.toml 3.12
python 3.13.0 ~/.config/mise/config.toml 3.13
$ cd /tmp/misetest
$ cat mise.toml
[tools]
python = "3.10"
[env]
_.python.venv = { path = ".venv", create = true }
$ mise list
Tool Version Config Source Requested
python 2.7.18
python 3.6.15
python 3.7.17
python 3.8.20
python 3.9.20
python 3.10.15 /tmp/misetest/mise.toml 3.10
python 3.11.10
python 3.12.7
$ which python3.10
/tmp/misetest/.venv/bin/python3.10
$ python3.11
Command 'python3.11' not found, |
When working in a virtual environment, it is sometimes useful to have the other global pythons to remain available.
For instance, when in a project directory with, say, a python 3.12 venv active, I sometimes need to run
tox -e py310
to run tests with another version.When the global pythons are managed with mise and
tools.python
is set, the other global pythons are not available.A possible solution would be to have
python
as an option of_.python.venv
that would be used overtools.python
which could then be absent.Assuming that makes sense and fits with the path you are following, of course.
The text was updated successfully, but these errors were encountered: