Code Quality & Packaging

pipenv

Merges the jobs of install this and remember exactly what I installed into one command.

Install it: pip install pipenv

What does it do?

Pipenv combines Python’s package installer with dependency tracking, automatically creating and maintaining an isolated environment and a lock file that records exactly what’s installed, all through one unified command-line tool. It’s like a subscription box service that not only sends you ingredients but keeps a running receipt of the precise items and quantities so a refill order is always identical to the last one. Before it, Python developers typically juggled two separate manual steps, installing packages and separately maintaining a requirements file, that could easily drift out of sync. Pipenv folded both into a single workflow explicitly aimed at being friendlier for less experienced developers.

See it in action

These are terminal commands that install a library into an isolated project environment, enter that environment, and run a program inside it.

pipenv install requests
pipenv shell
pipenv run python app.py

Why would a non-developer care?

A big share of confusing software installation failures trace back to mismatched dependency versions, and tools that automatically keep the what’s-installed record accurate reduce that whole category of frustration for anyone who ever has to set up a Python project from scratch.

Real-world examples

Pipenv was adopted early on by Python’s official packaging documentation as a recommended tool, giving it a period as the semi-official answer to how to manage a Python project before Poetry rose to prominence as an alternative. It’s still widely used, particularly in projects and tutorials that started during its peak popularity years.

Who uses it

Python developers, particularly newer ones, who want a straightforward, opinionated single tool for installing packages and managing environments together.

How it compares to alternatives

It’s most directly comparable to Poetry, which handles a similar problem with a somewhat different workflow and additional packaging features; Pipenv focuses more narrowly on dependency and environment management alone.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries