Installing (1.x)Âķ
Note
Installing Fabric 2.0 or above? Looking for non-PyPI downloads or source code checkout instructions? See Installing.
This document includes legacy notes on installing Fabric 1.x. Users are strongly encouraged to upgrade to 2.x when possible.
Basic installationÂķ
Fabric is best installed via pip; to ensure you
get Fabric 1 instead of the new but incompatible Fabric 2, specify <2.0:
$ pip install 'fabric<2.0'
All advanced pip use cases work too, such as installing the latest copy of
the v1 development branch:
$ pip install -e 'git+https://github.com/fabric/fabric@v1#egg=fabric'
Or cloning the Git repository and running:
$ git checkout v1
$ pip install -e .
within it.
Your operating system may also have a Fabric package available (though these
are typically older and harder to support), typically called fabric or
python-fabric. E.g.:
$ sudo apt-get install fabric
Note
Make sure to confirm which major version is currently packaged!
DependenciesÂķ
In order for Fabricâs installation to succeed, you will need four primary pieces of software:
the Python programming language;
the
setuptoolspackaging/installation library;the Python Paramiko SSH library;
and Paramikoâs dependency, Cryptography.
and, if using parallel execution mode,
the multiprocessing library.
Please read on for important details on each dependency â there are a few gotchas.
PythonÂķ
Fabric requires Python version 2.5+.
setuptoolsÂķ
Setuptools comes with most Python installations by default; if yours
doesnât, youâll need to grab it. In such situations itâs typically packaged as
python-setuptools, py26-setuptools or similar.
multiprocessingÂķ
An optional dependency, the multiprocessing library is included in Pythonâs
standard library in version 2.6 and higher. If youâre using Python 2.5 and want
to make use of Fabricâs parallel execution features youâll need to install it
manually; the recommended route, as usual, is via pip. Please see the
multiprocessing PyPI page for
details.
Warning
Early versions of Python 2.6 (in our testing, 2.6.0 through 2.6.2) ship
with a buggy multiprocessing module that appears to cause Fabric to
hang at the end of sessions involving large numbers of concurrent hosts.
If you encounter this problem, either use env.pool_size / -z to
limit the amount of concurrency, or upgrade to Python
>=2.6.3.
Python 2.5 is unaffected, as it requires the PyPI version of
multiprocessing, which is newer than that shipped with Python <2.6.3.