Skip to content

Rye

Do not use Rye!

There's a new and better tool for the same called uv.

Important settings for Rye

  1. Use UV internally in Rye. Enable uv with below command:

    rye config --set-bool behavior.use-uv=true
    

How to setup a Data Science project using rye?

rye init --virtual --no-readme

Above command will create below file structure.

./
├── .gitignore
├── .python-version
└── pyproject.toml

Now you can proceed by adding deps into the project with rye add command.

I use this way to setup my data science project.

Global packages with rye

Rye

I generally install ruff, uv and pytest (see rye test) in global.

How to setup a rye managed project in local?

Just run rye sync --no-dev which will install all deps required for project and then you can follow further instructions to setup the project.

--no-dev flag will prevent you to install dev deps. Remove it to install dev deps.