Pipenv
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.
Features⚑
- Enables truly deterministic builds, while easily specifying only what you want.
- Generates and checks file hashes for locked dependencies.
- Automatically install required Pythons, if
pyenvis available. - Automatically finds your project home, recursively, by looking for a
Pipfile. - 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 install, uninstall, and 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).
Basic Concepts⚑
- 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.
Other Commands⚑
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.
Installation⚑
In Debian: apt-get install pipenv
Or pip install pipenv.