采用
Python的项目和package管理一直被众多Python开发者所诟病,这样诞生了各种工具,如pip, pip-tools, virtualenv, poetry,
pipenv, conda, pyenv等等,这些工具各有优缺点,但是都没有一个完美的解决方案。
这一切可能伴随着uv 0.3+ 发布而改变。 uv是一款Python版本管理工具、项目管理工具、package管理工具,PEP 723 Python脚本执行器, 是Python界的Rust Cargo,亮点如下:
- 🚀 A single tool to replace pip, pip-tools, pipx, poetry, pyenv, virtualenv, and more.
- ⚡️ 10-100x faster than pip.
- 🐍 Installs and manages Python versions.
- 🛠️ Runs and installs Python applications.
- ❇️ Runs scripts, with support for inline dependency metadata.
- 🗂️ Provides comprehensive project management, with a universal lockfile.
- 🔩 Includes a pip-compatible interface for a performance boost with a familiar CLI.
- 🏢 Supports Cargo-style workspaces for scalable projects.
- 💾 Disk-space efficient, with a global cache for dependency deduplication.
- ⏬ Installable without Rust or Python via curl or pip.
- 🖥️ Supports macOS, Linux, and Windows.
uv使用Rust开发,背后的团队应该是Python大名鼎鼎的Ruff Lint工具团队, 伴随着uv 0.3,目前已经受到众多的Python开发者关注,就连rye作者所说,uv将会统一Python的工具链。
uv and Friends
- poetry: https://python-poetry.org/
- pip-tools: https://github.com/jazzband/pip-tools
- setup-uv: GitHub Actions for uv - https://github.com/eifinger/setup-uv