Install Python packages with pip to either the system or a virtualenv
salt.modules.pip.freeze(bin_env=None, user=None, runas=None, cwd=None)¶Return a list of installed packages either globally or in the specified virtualenv
Note
The runas argument is deprecated as of 0.16.2. user should be
used instead.
CLI Example:
salt '*' pip.freeze /home/code/path/to/virtualenv/
salt.modules.pip.install(pkgs=None, requirements=None, env=None, bin_env=None, use_wheel=False, log=None, proxy=None, timeout=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, global_options=None, install_options=None, user=None, runas=None, no_chown=False, cwd=None, activate=False, pre_releases=False, __env__=None, saltenv='base')¶Install packages with pip
Install packages individually or from a pip requirements file. Install packages globally or to a virtualenv.
index_urlbuild dirtarget dirdownload instead of installing themdownload_cache direditable packages into source dirNote
The runas argument is deprecated as of 0.16.2. user should be
used instead.
CLI Example:
salt '*' pip.install <package name>,<package2 name>
salt '*' pip.install requirements=/path/to/requirements.txt
salt '*' pip.install <package name> bin_env=/path/to/virtualenv
salt '*' pip.install <package name> bin_env=/path/to/pip_bin
Complicated CLI example:
salt '*' pip.install markdown,django editable=git+https://github.com/worldcompany/djangoembed.git#egg=djangoembed upgrade=True no_deps=True
salt.modules.pip.list_(prefix=None, bin_env=None, user=None, runas=None, cwd=None)¶Filter list of installed apps from freeze and check to see if
prefix exists in the list of packages installed.
CLI Example:
salt '*' pip.list salt
salt.modules.pip.uninstall(pkgs=None, requirements=None, bin_env=None, log=None, proxy=None, timeout=None, user=None, runas=None, no_chown=False, cwd=None, __env__=None, saltenv='base')¶Uninstall packages with pip
Uninstall packages individually or from a pip requirements file. Uninstall packages globally or from a virtualenv.
Note
The runas argument is deprecated as of 0.16.2. user should be
used instead.
CLI Example:
salt '*' pip.uninstall <package name>,<package2 name>
salt '*' pip.uninstall requirements=/path/to/requirements.txt
salt '*' pip.uninstall <package name> bin_env=/path/to/virtualenv
salt '*' pip.uninstall <package name> bin_env=/path/to/pip_bin
salt.modules.pip.version(bin_env=None)¶New in version 0.17.0.
Returns the version of pip. Use bin_env to specify the path to a
virtualenv and get the version of pip in that virtualenv.
If unable to detect the pip version, returns None.
CLI Example:
salt '*' pip.version
Current Salt release: 2014.1.7
Docs for previous releases on salt.rtfd.org.