Setting up Rye on Windows
TL;DR: Do not run pipx install rye
. Instead, first enable Developer Mode in Windows, and then use the official Rye installer.
Rye is a tool for managing python projects and their dependencies, in a similar vein as Poetry and Pipenv. These notes cover how (not) to set up Rye on Windows.
Installing Rye via pipx §
First, I naïvely tried to install Rye with pipx. It does not work:
Installing Rye via the official installer (first attempt) §
Next, I went to the official instructions.
It strongly recommends enabling developer mode:
If you do not, then:
- Virtualenvs will be created as copies rather than symlinks.
- Executables in .rye/py will be non-executable as they will be proxy files.
- Shims will be installed as hardlinks, which can cause issues updating Rye when Python is in use.
- More disk space may be used, as virtualenvs may not be deleted correctly.
In some places, junction points will used instead of symlinks, which may not be handled properly by other applications.
So I decided to abort the install and enable developer mode first.
Enabling developer mode in Windows §
To enable developer mode in Windows:
- Open start menu and search for developer settings.
- Open the developer settings window, and enable Developer Mode.
Installing Rye via the official installer (second attempt) §
With developer mode enabled, I ran the installer again:
The non-ASCII characters did not display in my Windows Command Prompt (they showed as � character), so I dug into the Rye source to figure out what characters they should have been.1
Note that:
- You can use
RYE_HOME
to override the default install location. - The installer provides a few prompts:
- You can choose the package installer. I went with uv as the default.
- You can choose what
python
andpython3
do outside of a Rye managed project. I chose to use the default Python, so that Rye does not break any existing Python projects I have.
Path §
On Windows, there is no need to add Rye to the PATH
. The installer will do that automatically.
Rye added %USERPROFILE%\.rye\shims
to the environment variables for my account, not for the whole system. This means Rye will only be available for my account. Not an issue, just something to be aware of.
Verify Rye is installed §
Run rye --version
just to check rye
is on the PATH
and see what version we have:
All done! Rye is ready for use.
Rye is written in Rust. It uses
ColorulTheme
from thedialoguer
crate for the TUI, which defines the style here. ↩︎