Integrating Uv, Conda and Pip without Getting Crazy
Last updated:
Table of Contents
- Create and Activate the Conda Virtualenv
- Sync the Conda Virtualenv from a Legacy requirements.txt File Using Uv
- Compile Dependencies into a Legacy requirements.txt File
WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.
See also Conda, Pip, Virtualenv and Pyenv: Commands Compared
My current setup on MacOS is as follows:
- Manage virtualenvs with Conda
- Manage dependencies with
uvbut also usepipin some legacy projects - Download, compile and sync dependencies with
uv
Create and Activate the Conda Virtualenv
TODO
- Install
uvinto the newly-created Conda virtualenv usingpip:$ pip install uv
Sync the Conda Virtualenv from a Legacy requirements.txt File Using Uv
(my-venv)$ uv pip sync requirements.txt
Compile Dependencies into a Legacy requirements.txt File
$ uv pip compile requirements.in -o requirements.txt