Author: Python Packaging Authority


Installing and Using Setuptools

.. contents:: **Table of Contents**

Installation Instructions

The recommended way to bootstrap setuptools on any system is to download
``_ and run it using the target Python environment. Different
operating systems have different recommended techniques to accomplish this
basic routine, so below are some examples to get you started.

Setuptools requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x

The link provided to is a bookmark to bootstrap script for the
latest known stable release.


Windows 8 (Powershell)

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Using Windows 8 or later, it's possible to install with one simple Powershell
command. Start up Powershell and paste this command::

    > (Invoke-WebRequest | python -

You must start the Powershell with Administrative privileges or you may choose
to install a user-local installation::

    > (Invoke-WebRequest | python - --user

If you have Python 3.3 or later, you can use the ``py`` command to install to
different Python versions. For example, to install to Python 3.3 if you have
Python 2.7 installed::

    > (Invoke-WebRequest | py -3 -

The recommended way to install setuptools on Windows is to download
``_ and run it. The script will download the appropriate .egg
file and install it for you.

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present. If you did a user-local install, the ``Scripts`` subdirectory is

Windows 7 (or graphical install)

For Windows 7 and earlier, download ``_ using your favorite web
browser or other technique and "run" that file.

Unix (wget)

Most Linux distributions come with wget.

Download ``_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget -O - | sudo python

Alternatively, Setuptools may be installed to a user-local path::

    > wget -O - | python - --user

Unix including Mac OS X (curl)

If your system has curl installed, follow the ``wget`` instructions but
replace ``wget`` with ``curl`` and ``-O`` with ``-o``. For example::

    > curl -o - | python

Advanced Installation

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <>`_
and run with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python install --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: