1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
pip/docs/installing.txt
2013-02-09 00:13:16 -08:00

74 lines
1.9 KiB
Plaintext

.. _`Installation`:
Installation
============
Python Support
--------------
pip works with CPython versions 2.5, 2.6, 2.7, 3.1, 3.2, 3.3 and also pypy.
Using virtualenv
----------------
The easiest way to install and use pip is with `virtualenv
<http://www.virtualenv.org>`_, since every virtualenv has pip (and it's dependencies) installed into it
automatically.
This does not require root access or modify your system Python
installation. For instance::
$ virtualenv my_env
$ . my_env/bin/activate
(my_env)$ pip install SomePackage
When used in this manner, pip will only affect the active virtual environment.
See the `virtualenv installation instructions <http://www.virtualenv.org/en/latest/#installation>`_.
Installing Globally
-------------------
pip can be installed globally in order to manage global packages.
Often this requires the installation to be performed as root.
Prerequisites
+++++++++++++
A global install of pip requires either `setuptools <http://pypi.python.org/pypi/setuptools>`_
or `distribute <http://pypi.python.org/pypi/distribute>`_ to be installed globally as well.
In many cases, these can be installed using your OS package manager.
See the `Distribute Install Instructions <http://pypi.python.org/pypi/distribute/>`_ or the
`Setuptools Install Instructions <http://pypi.python.org/pypi/setuptools#installation-instructions>`_
.. warning::
If you are using Python 3.X you **must** use distribute; setuptools doesn't
support Python 3.X.
Using get-pip
+++++++++++++
Download `get-pip.py <https://raw.github.com/pypa/pip/master/contrib/get-pip.py>`_
and execute it using Python. This will only install pip, not the prerequisites.
::
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ [sudo] python get-pip.py
From source
+++++++++++
::
$ curl -O https://pypi.python.org/packages/source/p/pip/pip-X.X.tar.gz
$ tar xvfz pip-X.X.tar.gz
$ cd pip-X.X
$ [sudo] python setup.py install