Archive

How to install Python Installer Package - PIP for Windows and Unix

"pip.py" is a Python package manager that automatically downloads and installs package updates and require libraries for Python packages much like the 'apt-get' utility does for Ubuntu.  The utility installs under your /<pythonDir>/tools/Scripts directory.  You will want to add this to your Path variable.  The ActiveState distribution of Python already comes with this package and their installer adds it to your path automatically.

You will need to install this package as it is not included with the Python.org distribution of Python.

To install from source:

Download from:

https://pypi.python.org/pypi/pip/ (use this for your unix install)

To install on Ubuntu:

$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv

To install with a friendly Microsoft Windows GUI:

 

https://sites.google.com/site/pydatalog/python/pip-for-windows

Install a package:

$ pip install SomePackage==1.0
  [...]
  Successfully installed SomePackage

Show what files were installed:

$ pip show --files SomePackage
  Name: SomePackage
  Version: 1.0
  Location: /my/env/lib/pythonx.x/site-packages
  Files:
   ../somepackage/__init__.py
   [...]

List what packages are outdated:

$ pip list --outdated
  SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

$ pip install --upgrade SomePackage
  [...]
  Found existing installation: SomePackage 1.0
  Uninstalling SomePackage:
    Successfully uninstalled SomePackage
  Running setup.py install for SomePackage
  Successfully installed SomePackage

Uninstall a package:

$ pip uninstall SomePackage
  Uninstalling SomePackage:
    /my/env/lib/pythonx.x/site-packages/somepackage
  Proceed (y/n)? y
  Successfully uninstalled SomePackage