pip-tools 1.0 released (2024)

Yesterday, pip-tools version 1.0 was silently released, officially introducingthe pip-compile and pip-sync tools, and replacing the currentpip-dump and pip-review tools.

I've blogged before about these ideas in Pinning Your Packages and BetterPackage Management. During the last year, I've been slowly working on thefuture branch on the pip-tools repo, and have been using the new tools there.The pip-sync script was the only thing that was still delaying the release,but since Hugo Peixoto contributed this one recently,it's now ready to switch over.

So it's now time to switch over to the new tools if you've been using the oldones.

Old: pip-review, pip-dump
New: pip-compile, pip-sync

How to upgrade

If you're using pip-tools 0.x, you'll notice that its main commands, pip-reviewand pip-dump are gone. Instead, you'll find two new commands, pip-compile andpip-sync, which should allow you to do the same things, but arguably in a moresolid way.

Typical usage:

  • pip install pip-tools
  • Record your top-level dependencies in requirements.in. Everything you directly use in your source code should be a top-level dependency.
  • Don't pin them—unless you want them pinned, of course.
  • Put both requirements.in and requirements.txt under version control.
  • Then, run pip-compile. This will produce a requirements.txt that pins the high-level requirements to the highest versions found on PyPI to match the given requirements.
  • Using pip-sync now will install/upgrade/uninstall everything so that your virtual env exactly matches what's in requirements.txt.

For more information, see theREADME of the new tools.

Let me know how it works for you!

Other posts on this blog

pip-tools 1.0 released (2024)
Top Articles
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 6411

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.