Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world.
It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile.lock, which is used to produce deterministic builds.
- Enables truly deterministic builds, while easily specifying only what you want.
- Generates and checks file hashes for locked dependencies.
- Automatically install required Pythons, if
- Automatically finds your project home, recursively, by looking for a
- Automatically generates a
Pipfile, if one doesn't exist.
- Automatically creates a virtualenv in a standard location.
- Automatically adds/removes packages to a
Pipfilewhen they are un/installed.
- Automatically loads
.envfiles, if they exist.
The main commands are
lock, which generates a
Pipfile.lock. These are intended to replace
$ pip install usage, as well as manual virtualenv management (to activate a virtualenv, run
$ pipenv shell).
- A virtualenv will automatically be created, when one doesn't exist.
- When no parameters are passed to
install, all packages
[packages]specified will be installed.
- Otherwise, whatever virtualenv defaults to will be the default.
shellwill spawn a shell with the virtualenv activated.
runwill run a given command from the virtualenv, with any arguments forwarded (e.g.
$ pipenv run python).
checkasserts that PEP 508 requirements are being met by the current environment.
graphwill print a pretty graph of all your installed dependencies.
apt-get install pipenv
pip install pipenv.