Pip Documentation

[Pages:39]pip Documentation

Release 1.2.1 The pip developers

June 24, 2013

CONTENTS

i

ii

pip Documentation, Release 1.2.1

pip is a tool for installing and managing Python packages, such as those found in the Python Package Index. It's a replacement for easy_install.

$ pip install simplejson [... progress report ...] Successfully installed simplejson

Upgrading a package:

$ pip install --upgrade simplejson [... progress report ...] Successfully installed simplejson

Removing a package:

$ pip uninstall simplejson Uninstalling simplejson:

/home/me/env/lib/python2.7/site-packages/simplejson /home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info Proceed (y/n)? y Successfully uninstalled simplejson

CONTENTS

1

pip Documentation, Release 1.2.1

2

CONTENTS

CHAPTER

ONE

INSTALLATION INSTRUCTIONS

The recommended way to use pip is within virtualenv, since every virtualenv has pip installed in it automatically. This does not require root access or modify your system Python installation. For instance: $ curl -O $ python virtualenv.py my_new_env $ . my_new_env/bin/activate (my_new_env)$ pip install ... When used in this manner, pip will only affect the active virtual environment. If you do want to install pip globally into your Python installation, see the instructions below.

1.1 Prerequisites

Prior to installing pip make sure you have either setuptools or distribute installed. Please consult your operating system's package manager or install it manually: $ curl | python

Warning: If you are using Python 3.X you must use distribute; setuptools doesn't support Python 3.X.

1.2 Using the installer

Download get-pip.py and execute it, using the Python interpreter of your choice: $ curl | python This may have to be run as root.

1.3 Alternative installation procedures

1.3.1 Using the source distribution

You can find the source on PyPI:

3

pip Documentation, Release 1.2.1

$ curl -O $ tar xvfz pip-1.0.tar.gz $ cd pip-1.0 $ python setup.py install # may need to be root

1.3.2 Installing the development version

First you will need to clone the git repo: $ git clone Now we can install from the repo: $ cd pip $ python setup.py install # may need to be root

4

Chapter 1. Installation instructions

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download