# salt.states.pip

## Installation of Python Packages Using pip

These states manage system installed python packages. Note that pip must be installed for these states to be available, so pip states should include a requisite to a pkg.installed state for the package which provides pip (`python-pip` in most cases). Example:

    python-pip:
      pkg.installed

    virtualenvwrapper:
      pip.installed:
        - require:
          - pkg: python-pip

`salt.states.pip_state.` `installed`(name, pip_bin=None, requirements=None, env=None, bin_env=None, use_wheel=False, log=None, proxy=None, timeout=None, repo=None, editable=None, find_links=None, index_url=None, extra_index_url=None, no_index=False, mirrors=None, build=None, target=None, download=None, download_cache=None, source=None, upgrade=False, force_reinstall=False, ignore_installed=False, exists_action=None, no_deps=False, no_install=False, no_download=False, install_options=None, user=None, runas=None, no_chown=False, cwd=None, activate=False, pre_releases=False)

  Make sure the package is installed

  name
    The name of the python package to install
  user
    The user under which to run pip
  pip_bin : None
    Deprecated, use bin_env
  use_wheel : False
    Prefer wheel archives (requires pip>=1.4)
  env : None
    Deprecated, use bin_env
  bin_env : None
    the pip executable or virtualenv to use

  Changed in version 0.17.0: `use_wheel` option added.

  Attention

  As of Salt 0.17.0 the pip state needs an importable pip module. This usually means having the system's pip package installed or running Salt from an active virtualenv.

  The reason for this requirement is because `pip` already does a pretty good job parsing it's own requirements. It makes no sense for Salt to do `pip` requirements parsing and validation before passing them to the `pip` library. It's functionality duplication and it's more error prone.

`salt.states.pip_state.` `removed`(name, requirements=None, bin_env=None, log=None, proxy=None, timeout=None, user=None, runas=None, cwd=None)

  Make sure that a package is not installed.

  name
    The name of the package to uninstall
  user
    The user under which to run pip
  bin_env : None
    the pip executable or virtualenenv to use

Current Salt release: 0.17.1

### Table Of Contents

- salt.states.pip
  - Installation of Python Packages Using pip

#### Previous topic

salt.states.pecl

#### Next topic

salt.states.pkg

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd