Shawn Ng

Moving From Conda to UV

UV is an extremely fast Python package installer and resolver, written in Rust, and designed as a drop-in replacement for pip and pip-tools workflows.

I was upgrading my Linux Mint VM from 21.3 to 22.1, but the upgrade process failed, causing my VM to be stuck in the bootup stage. 

Hence, I have to recreate an entirely new Linux Mint 22.1 VM.

Since the VM is entirely fresh, I am using this opportunity to update my Python package management strategy. Earlier, I used Conda, but after some research, I decided to move to UV instead.

Advantages and Disadvantages

Feature uv conda
Primary Focus Python package and project management
Language-agnostic package and environment management
Language Rust Python
Speed Significantly faster than pip (10-100x reported)
Can be slower for package installation and environment setup
Environment Management Built-in
Built-in, strong environment isolation
Dependency Resolution Fast, modern resolver
Robust dependency resolution
Lock Files Generates lock files for reproducible environments
Generates lock files for reproducible environments
Package Management Primarily focused on Python packages (PyPI)
Manages Python and non-Python packages
Non-Python Dependencies Limited support
Excellent support for system-level and other language dependencies
Python Version Management Can install and manage Python versions
Can install and manage Python versions within environments
Ecosystem Integration Seamless with existing Python packaging standards (pip, etc.)
Strong ecosystem, integrates well with data science and scientific tools
Resource Usage Very efficient, low memory footprint
Can have higher memory usage
Ease of Use (Basic) Designed as a drop-in replacement for pip workflows
Relatively straightforward for basic package and environment management
Ease of Use (Advanced) Streamlined, modern approach
Feature-rich, but can have a steeper learning curve for advanced features
Community & Maturity Newer, but actively developed
Mature and widely adopted, large community
Use Cases General Python projects, especially where speed is critical
Data science, scientific computing, projects with non-Python dependencies
Installation Standalone installer, pip, pipx
Anaconda, Miniconda, pip

 

Performance

I won't share the benchmark as there are many out there, but I agree that it's faster and lighter. 

Maintenance

UV is easier to maintain as it uses PyPI, and I don't have to worry about conda channels. Conda channel is a double-edged sword that works in general, until you meet something such as RAPIDS installation

UV is more painful when libraries require OS binaries, such as GDAL.

Use UV if you prefer modular architecture, where each component focuses on doing its role perfectly. Use Conda if you don't want to handle anything since it's "battery-included" design.

Recovery

To recreate a conda environment, I prefer to use environment.yml. This is quite reliable, but based on my experience recreating in AWS EC2, it requires at least 4 GB of memory if you can wait and tolerate occasional OOM and have to restart the process.

UV's pyproject.toml is good, requirements.txt can also serve as a backup.

Long-term Direction

I am not confident about Conda's direction with the licensing. Which is a big reason why I am moving to UV, because I think eventually I have to migrate, might as well do it now.

Conclusion

Go ahead and try UV, there isn't a learning curve, you can pick it up in 1 hour.

Published: 2025-05-18 | Updated: 2025-05-18

Share this!