How to change the default toolchain? #1276
-
I am trying to update the default toolchain used by rye. Note that this is not the project specific toolchain. $ cat ~/.rye/config.toml
[behavior]
use-uv = true
[default]
toolchain = "cpython@3.12.4" $ rye toolchain remove 3.12.2
error: toolchain cpython@3.12.2 is still in use by rye itself $ rye self update
Updating to latest
Checking checksum
Validate updated installation
Initializing new virtualenv in /tmp/.tmppOk3zx/.venv
Python version: cpython@3.12.4
Updated!
rye 0.37.0
commit: 0.37.0 (09b67c469 2024-07-20)
platform: linux (x86_64)
self-python: cpython@3.12.2
symlink support: true
uv enabled: true How can I make rye use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You can see all the available versions with |
Beta Was this translation helpful? Give feedback.
-
Rye updates its self-venv if it knows its version marker for that venv has changed (happens in some version updates of Rye but not all). It will use the newest available toolchain to do so. With some knowledge of Rye internals you can do this: rye fetch 3.12.4 # (ensure it's available).
rm .rye/self/tool-version.txt # remove or change the version marker Then do anything where rye wants to have its self venv. For example sync in one of your projects:
|
Beta Was this translation helpful? Give feedback.
Rye updates its self-venv if it knows its version marker for that venv has changed (happens in some version updates of Rye but not all). It will use the newest available toolchain to do so.
With some knowledge of Rye internals you can do this:
Then do anything where rye wants to have its self venv. For example sync in one of your projects: