-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Specific python version for auto created venv, docs/RFE #1897
Comments
sorry for being so late, the honest answer is I don't really know myself—I'd need to dig a little bit. I believe that it's going to use whatever is in PATH for Certainly though I do agree that you should be able to specify the version explicitly |
I think this is correct. The behaviour seems to be that it always used the first version in the list. This doesn't seem like a big issue to me. I think you've got two good options: 1. DocumentAdd this behaviour to the docs, that the first version in the list is used for the venv. Then also recommend that people add a comment to their mise.toml files: [tools]
python = [
"3.12", # First version in the list will be used for the venv.
"3.13-dev",
]
[env]
_.python.venv = { path = "venv", create = true } # Will use the first python version in the tools list 2. Add a new param to the env._.python.venv[tools]
python = [
"3.12",
"3.13-dev",
]
[env]
_.python.venv = { path = "venv", create = true, version = "3.12" } I wouldn't use the suggested syntax because it's a big change from the existing syntax: [tools]
python = [
{version = "3.12", virtualenv = ".venv", create = true},
"3.13-dev",
] Next stepsUp to @jdx to choose between updating the docs or implementing the version param. Personally I think the version param is overkill and I recommend just updating the docs. I'm happy to have a go at updating the docs. |
we already have that https://mise.jdx.dev/lang/python.html#automatic-virtualenv-activation |
Perfect, I think this issue can be closed then. |
It seems with this config, the venv will be created using Python 3.12 (the first listed). I could not find a way to be explicit about that, and the docs don't seem to have anything regarding which version will the venv be created with in case there are multiple.
Could the docs be clarified about this?
And/or perhaps add some syntax with which one could be explicit about the created venv python version, e.g.
(Does not currently work, complains about expecting a string where the boolean
true
is)mise version 2024.4.4 linux-x64 (37b44e2 2024-04-11)
The text was updated successfully, but these errors were encountered: