Forrest logo
back to the pipenv tool

pipenv:tldr:2b4ad

pipenv: Install all the dependencies for a project (including dev packages).
$ pipenv install --dev
try on your machine

The command pipenv install --dev is used in Python projects to install both production and development dependencies using the Pipenv package manager.

Here's what each part of the command means:

  • pipenv: This is the command-line tool provided by Pipenv.
  • install: This is a subcommand used to install packages.
  • --dev: This flag is used to specify that the packages being installed are for development purposes only.

Typically, in a Python project, you have dependencies that are required for the production environment (running the actual code) and dependencies that are only needed for development (such as testing frameworks or linters). By using the --dev flag, you are ensuring that only the packages required for development are installed.

The Pipfile and Pipfile.lock files in your project directory are used to manage dependencies. When you run pipenv install --dev, Pipenv will read these files, find the listed dependencies under the dev-packages section, and install them into a virtual environment. These dev packages are usually separated from the regular packages under the packages section, which would be installed using pipenv install.

Using the --dev flag helps keep your project organized by clearly distinguishing between production and development dependencies, and it ensures that your virtual environment only has the packages relevant to the current environment.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pipenv tool