What is this?
Pipenv is a Python development workflow tool that manages virtualenvs and packages together: it creates a virtualenv per project, tracks dependencies in a Pipfile, and locks exact versions in Pipfile.lock for deterministic builds.
How is it different from using pip and virtualenv separately?
One tool replaces the pip + virtualenv combo: Pipenv creates and manages the virtualenv for you, records dependencies in a Pipfile, and pins the last tested combination in Pipfile.lock.
How do I install it and start using it on a project?
Run pip install --user pipenv (needs Python 3.10+; pipx, python -m pip and native FreeBSD/Gentoo/Void packages also work). In a project, pipenv install auto-creates the virtualenv and installs everything in the Pipfile; pipenv shell activates it.
Do I need pyenv or asdf, or does it work with my system Python?
It works with your system Python by default, but if pyenv or asdf is available it can automatically install a required Python version; pin one per project with pipenv --python 3.7.
Does it matter whether I'm on Linux, macOS or Windows?
No — Linux, macOS and Windows are all first-class citizens, and the tab completion instructions even cover Git Bash on Windows.
Can I still produce a requirements.txt from it?
Yes — pipenv requirements generates a requirements.txt from your Pipfile.lock for whenever a downstream tool still expects one.
Does it load .env files automatically?
Yes — a .env in the project is loaded automatically; pipenv shell even prints 'Loading .env environment variables...' before launching the subshell.
What other commands are handy day to day?
pipenv graph shows the dependency tree, pipenv lock regenerates the lockfile, pipenv sync installs exactly what's locked, pipenv clean removes packages not in Pipfile.lock, and pipenv --rm deletes the virtualenv.
Which topics is it in?
pip, packaging, package-manager, command-line-tool, security, free, tool, cli, python, cross-platform, developer-tools, mit