Open-source project
pypa/pipenv avatar
pypa/pipenv

pipenv: Pipfile, Pipfile.lock and the parts of it that still carry old weight

Python Development Workflow for Humans.

25,025 stars1,878 forksPythonMIT

At a glance

What is it?
pipenv wraps virtualenv and pip into one project workflow with a two-file dependency model and hash verification. The current release line also ships a resolver subprocess, a pylock example and a vendored pip.
Who is it for?
pipenv still earns its place for application developers who want one command that finds the project, builds the virtualenv and installs from a lock file without thinking about pip's flags. It is a weaker fit for library maintainers, for teams already standardised on `python -m venv` plus `requirements.txt`, or for anyone who wants pip without a layer on top.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 8, 2026, and from our analysis. They are not legal advice.

Editorial analysis

One command that finds the project and creates the virtualenv

The pitch in the README is that pipenv bridges the gap between pip, python and virtualenv, and that Linux, macOS and Windows are all first-class. The mechanism is project discovery: pipenv looks recursively for a `Pipfile`, treats the directory holding it as the project home, and creates a virtualenv in a standard location if one does not exist. You no longer run `virtualenv` and then remember to activate it.

Installing pipenv is deliberately unopinionated about how, which is itself a hint about where it sits in the ecosystem:

bash
pip install --user pipenv

`python -m pip install pipenv` and `pipx install pipenv` are both offered as alternatives, and the README lists package-manager routes for FreeBSD, Gentoo and Void Linux. There is also `get-pipenv.py` in the repository tree, a standalone bootstrap script. The floor is Python 3.10 and above, which `pyproject.toml` states as `requires-python = ">=3.10"` and the classifiers enumerate from 3.10 through 3.14 on both CPython and PyPy.

Runtime dependencies are short and tell you what it actually delegates to: `certifi`, `packaging>=22`, `setuptools>=67` and `virtualenv>=20.26.6`. There is no vendored resolution logic in that list, which is consistent with a project that wraps rather than reimplements.

Pipfile and Pipfile.lock split intent from the tested combination

The core argument is about `requirements.txt`. The README's complaint is that managing a requirements file with package hashes is problematic, and that pipenv separates abstract dependency declarations from the last tested combination. That is the two-file model: `Pipfile` says what you want, `Pipfile.lock` records what was resolved and verified.

The lock file is where the security claim lives. Hashes are documented in the lock file and verified during install, which turns a resolution into something checkable rather than something trusted. The README also says pipenv encourages the latest versions of dependencies to reduce the risk of known vulnerabilities, which is a defensible default for applications and a debatable one for libraries.

Two behaviours follow from the model. When no arguments are passed to `install`, everything in the `[packages]` section is installed, which makes a fresh clone reproducible in one command. And because pipenv edits the `Pipfile` as you install and uninstall, the declaration file and the lock file have to be committed together; a stale lock file is the failure mode that bites people who adopt it halfway through a project.

The tree shows this format is not alone. Alongside `Pipfile` and `Pipfile.lock` at the root there is a `pylock.toml`, and `examples/` holds `Pipfile`, `Pipfile.lock`, `Pipfile.with_pylock` and `pylock.toml`. Those example files are the clearest signal of where the project is heading: PEP 751 style locking is being taken seriously enough to ship worked examples alongside its own format.

What the 2026 releases show about the resolver

Three releases in July and August 2026 describe a project doing real work on dependency resolution rather than just wrapping it. v2026.7.0, published 2026-08-03, adds a wall-clock timeout for the resolver subprocess through `PIPENV_RESOLVER_TIMEOUT_S`, so a hung resolve becomes recoverable rather than something you kill by hand. It also adds structured diagnostic logging from the resolver into `Diagnostics.resolver_log`, and support for major-only version specifiers such as `python_version = "3"`.

The same release unified the in-process and subprocess resolver paths into a single `resolve_for_pipenv` function and had the subprocess communicate with typed `ResolverRequest` and `ResolverResponse` structures. So the architecture shifted toward always using a subprocess, with a typed boundary, which is the shape you want if you intend resolution to be cancellable and interruptible.

v2026.7.1 on 2026-08-04 fixed host package leakage into project installs, so system-level packages were no longer visible inside project virtualenvs. That is a correctness bug with real consequences for reproducibility, and its presence tells you what kind of subtle problem this tool exists to solve. The same release made interrupted releases resumable and fixed locked transitive dependency installation.

v2026.8.0 on 2026-08-20 added parallel index manifest prefetching behind `PIPENV_PREFETCH_INDEX_MANIFESTS`, PEP 691 JSON Simple API parsing alongside the older PEP 503 HTML parsing, and a disk-based manifest cache with TTL and atomic writes. It also laid scaffolding for pluggable resolver backends. All three changelogs are headed as AI-generated, which is a transparency choice worth noting on its own: the release notes are machine-written summaries rather than hand-curated ones.

The last push to the repository was on 2026-09-18.

Shell completion changed in 2026 and broke the old recipe

One small change in the README is worth flagging because it will waste an afternoon if you miss it. Shell completion now runs through argcomplete, installed as an extra:

bash
pip install "pipenv[completion]"

Each shell then gets its own registration line. For zsh, an autoload of `bashcompinit` followed by `eval "$(register-python-argcomplete pipenv)"` in `~/.zshrc`. For bash, the same eval line in `~/.bashrc` or `~/.bash_profile`, which also covers Git Bash on Windows. For fish, `register-python-argcomplete --shell fish pipenv | source` in `~/.config/fish/completions/pipenv.fish`, and there is a separate fish plugin that activates subshells for you.

The important line is the note. If you are upgrading from pipenv older than 2026.5.0, the previous `_PIPENV_COMPLETE` environment variable method no longer works and has to be replaced by the argcomplete commands. An upgrade that silently kills your completions is the kind of thing worth reading the release notes for, and this README states it in a blockquote rather than burying it.

This is also the only place where the README's own feature list uses promotional language, when it describes supporting local customizations with `.env` files. The behaviour is real: pipenv loads `.env` files automatically when they exist. Pipenv's dependency list does not include a dotenv package, so the loading is done by pipenv itself rather than delegated.

The cases where pipenv is the wrong choice

The strongest case against pipenv is library packaging. pipenv optimises for applications, which the README says outright: it is primarily meant to give users and developers of applications an easy way to arrive at a consistent working project environment. A library does not have one consistent environment, it has many, and its consumers resolve its dependencies themselves. Shipping a Pipfile to library users asks them to adopt your workflow for no benefit, and there is no equivalent of `pyproject.toml`'s metadata story in a Pipfile.

The second case is teams with an existing standard. If your organisation has standardised on `python -m venv` plus a requirements file, pipenv adds a format, a lock file and a resolver layer to buy a modest improvement in convenience. The trade is real but small, and it is paid in onboarding friction for every new contributor.

The third case is anything where you want to stay close to pip. pipenv is a layer over pip, and the repository shows the cost of that in its shape: `pipenv/patched/` appears in the packaging configuration, and the `Makefile` reads a patched pip version out of `pipenv/patched/pip/__init__.py` to decide what to vendor. A project that patches its own package manager accumulates maintenance obligations that a thin wrapper would not have.

Against the native alternative, the comparison is `venv` plus `uv` or plain `pip`. `venv` ships with Python, so it will always be there. uv adds fast resolution without a project-specific file format. pipenv's answer to those is the two-file model with verified hashes and a single command for the whole loop, which is a real advantage when you want one command rather than three and a lock file you can read.

Editorial conclusion

pipenv still earns its place for application developers who want one command that finds the project, builds the virtualenv and installs from a lock file without thinking about pip's flags. It is a weaker fit for library maintainers, for teams already standardised on `python -m venv` plus `requirements.txt`, or for anyone who wants pip without a layer on top. Verify two things before adopting it in a new repository: that `Pipfile.lock` is committed and regenerated deliberately, and that you have read the `pylock.toml` examples under `examples/` if your organisation has been standardising on PEP 751. Start with `pipenv install` on an existing project and run `pipenv graph` before committing to the format, because the lock file is what you are really choosing.

Frequently asked questions

What is pipenv used for?

Pipenv manages a project's virtual environment and its dependencies together. It finds the project by locating the `Pipfile`, creates a virtualenv in a standard location, edits the `Pipfile` as you install packages, and generates a `Pipfile.lock` used to produce deterministic builds.

Is pipenv better than pip?

They are not really competitors. pip is the installer; pipenv is a project wrapper around pip and virtualenv. What pipenv adds is project discovery, automatic virtualenv creation, a `Pipfile` that records abstract intent and a lock file whose hashes are verified on install. What it costs is an extra layer and a second file format.

Which is better, pipenv or pyenv?

They solve different problems. pyenv installs and switches Python interpreter versions, and pipenv will use pyenv or asdf automatically if they are available. pipenv then manages the virtualenv and the dependencies inside whichever interpreter you select.

Which Python virtual environment is the best?

The built-in `venv` module is the baseline, since it ships with Python and needs no third-party tool. pipenv builds on virtualenv and adds project-level dependency management, while `pyenv` and `asdf` solve the separate problem of choosing which Python version to run. The README states pipenv can install required Pythons automatically when pyenv or asdf is present.

Official sources

  1. License: MIT
  2. Project website
  3. pypa/pipenv on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/pypa-pipenv.svg)](https://hysenlabs.com/projects/pypa-pipenv)