easy_install – Installs Python libraries
easy_install – Installs Python libraries
Synopsis
- Installs Python libraries, optionally in a virtualenv
Requirements
The below requirements are needed on the host that executes this module.
- virtualenv
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
executable - added in 1.3 |
The explicit executable or a pathname to the executable to be used to run easy_install for a specific version of Python installed in the system. For example | |
name - / required |
A Python library name | |
state - added in 2.0 |
|
The desired state of the library. |
virtualenv - |
an optional virtualenv directory path to install into. If the virtualenv does not exist, it is created automatically | |
virtualenv_command - |
Default: "virtualenv" |
The command to create the virtual environment with. For example |
virtualenv_site_packages boolean |
|
Whether the virtual environment will inherit packages from the global site-packages directory. Note that if this setting is changed on an already existing virtual environment it will not have any effect, the environment must be deleted and newly created. |
Notes
Note
- Please note that the
easy_install
module can only install Python libraries. Thus this module is not able to remove libraries. It is generally recommended to use the pip module which you can first install using easy_install. - Also note that virtualenv must be installed on the remote host if the
virtualenv
parameter is specified.
Examples
# Examples from Ansible Playbooks
- easy_install:
name: pip
state: latest
# Install Bottle into the specified virtualenv.
- easy_install:
name: bottle
virtualenv: /webapps/myapp/venv
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Matt Wright (@mattupstate)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/easy_install_module.html